Like numbers, there are palindrome strings as well. These strings remain the same, even when they are written in the reverse order. When strings are large, a program can be efficient in finding palindromic strings than being checked manually. This post discusses two ways of reversing a string, and a way of finding a palindrome without actually reversing the string.
From simple to more complex, there are lot of patterns which can be created using stars ('*') in C language. Six such chosen patterns are presented along with the full implementation of code in C. Non-obvious parts of the code are explained in detail.
Comments in code are usually written for a better understanding of the code. But, these comments are dropped during the compilation process. This post concentrates on a C code which is able to remove all sorts of comments from another C program file.
While we write programs, often we come across places where the strings are required to be converted into one particular case, either upper case or lower case. This post discusses about different methods for converting case of fixed length null-terminated strings in C language.
The command history is a shell built-in, primarily used to view a list of commands, which have been executed before. The history command uses a file .bash_history, generally located in the /home/user/ folder for users other than root, and for root, the file is found in /root/. Well, a simple implementation of the history command in a shell, is discussed through with source code typed in C language.
A Circular Queue, also known as a Ring Buffer, is a First In First Out [FIFO] queue, having an upper bound but wraps around. This mean the queue is able to start from beginning when it reaches the end. Queues are generally implemented as Ring buffers, when there is a substantial limit for the number of elements that can be held at maximum.