Computer Science

Dynamic Memory Allocation

Dynamic Memory Allocation in C Language – Memory Allocation Process

Most often we face situations in programming where the data is dynamic in nature. That is, the number of data items keep changing during execution of the program. For example, consider a program for processing the list of customers of a corporation. The list grows when names are added and shrinks when names are deleted.

Dynamic Memory Allocation in C Language – Memory Allocation Process Read More »

Function Declaration

Function Declaration in C – User Defined Functions

Like variables, all functions in a C program must be declared, before they are invoked. A function declaration (also known as function prototype) consists of four parts. Function type (return type) Function name Parameter list Terminating semicolon They are coded in the following formate : Function-type function-name (parameter list); This is very similar to the

Function Declaration in C – User Defined Functions Read More »

Definition of function

Definition of Function in C – User Defined Functions

Definition of Function in C A function definition, also known as function implementation shall include the following elements 1. function name; 2. function type; 3. list of parameters; 4. local variable declarations; 5. function statements; and 6. a return statement. All the six elements are grouped two parts, namely, ♦ function header (First three elements);and

Definition of Function in C – User Defined Functions Read More »