Dynamic Memory Allocation
Dynamic Memory Allocation
Programming
Subject: Problem-Solving Using C
Raj K Baliyar Singh, Asst. Professor, Dept. CSE
Memory allocated during compile time is called static memory. The memory
allocated is fixed and can not be increased or decreased during run time.
If allocating memory for an array during compile time so the size of the array is
fixed during declaration. Which can not be increased or decreased at run time.
Wastage of memory if the values stored in an array are less than its size.
Typecasting in C is the process of converting one data type to another data type
by the programmer using the casting operator during program design.
int x;
float y;
y = (float) x;
malloc allocates the memory requested by the user without knowing the type of
data to be stored inside the memory.
return 0;
}