Computer Science

Dynamic Memory Allocation in C Language – Memory Allocation Process

Dynamic Memory Allocation

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 »

Central Processing Unit (CPU) – Input and Output Modules

Central Processing Unit (CPU)

The “brain” of the system which has three sub-parts. Central Processing Unit (CPU) (i) Microprocessor: Microprocessor caries out mathematic and logical operations. (ii) Memory: The area of the CPU in which data and information is stored and retrieved. It holds the system software and user program. (iii) Power supply: The electrical supply that converts Alternating

Central Processing Unit (CPU) – Input and Output Modules Read More »

Function Declaration in C – User Defined Functions

Function Declaration

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 in C – User Defined Functions

Definition of function

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 »