recursion in C

Recursion is a process in which function call itself and the function that calls itself directly or indirectly called recursive function. A recursive function calls itself so there can be several numbers of the recursive call, so the recursive function should have the termination condition to break the recursion. If there is a not termination…

Memory Layout In C

Basically, memory layout of C program contains five segments these are the stack segment, heap segment, BSS (block started by symbol), DS (Data segment) and text segment. Each segment has own read, write and executable permission. If a program tries to access the memory in a way that is not allowed then segmentation fault occurs….

pointers as member

A pointer could be a member of structure, but you should be careful before creating the pointer as a member of structure in C. Generally we take a pointer as a member when we don’t know the length of the data which need to store. Let’s see an example to the better understanding,

The…

pointer to string array in c

In my previous article, I had described the array in brief but I have received some email from the subscriber and they want me to write an article on string array in C. If you want to read the array, you can see my article brief introduction of the array. We can create the string array…