C Language

vector in C

Implement Vector in C

In my previous article, I have explained how we can create a dynamic array in C.  But my reader says to write an article to create a vector in C. Basically vector is a dynamic array that has the ability to resize itself automatically when an element add or removed from the vector. A vector

Implement Vector in C Read More »

recursion in C

Recursion in C

Recursion is a process in which function call itself and the function that calls itself directly or indirectly called a 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

Recursion in C Read More »

Memory Layout In C

Memory Layout of C program

Memory layout of a C program typically represented by five main segments: Stack Segment: Local variables reside in stack, and it also handles function call management. Heap Segment: All dynamic memory allocation (memory allocation during runtime using functions like malloc(), calloc(), …etc.) manages by heap dynamic. BSS (Uninitialized Data Segment): Stores global and static variables

Memory Layout of C program Read More »