C Programming - Memory Allocation
Exercise : Memory Allocation - General Questions
1.
Which header file should be included to use functions like malloc() and calloc()?
2.
What function should be used to free the memory allocated by calloc() ?
3.
How will you free the memory allocated by the following program?
#include<stdio.h>
#include<stdlib.h>
#define MAXROW 3
#define MAXCOL 4
int main()
{
int **p, i, j;
p = (int **) malloc(MAXROW * sizeof(int*));
return 0;
}
4.
Specify the 2 library functions to dynamically allocate memory?
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers