C Language

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 »

C macros and its types in C

C Macros are defined using the #define preprocessor directive and do not need to be terminated by a semicolon (;). In C programming, macro is a piece of code which has been given a name using the #define, we will see it in the below example code. Whenever we use this name in the code,

C macros and its types in C Read More »