Vidyalelo
Computer Science · Q700

Linux

Engineering and GATE · Computer Science · question 700

Q700

This program will allocate the memory of . . . . . . . . bytes for pointer "ptr". #include #include int main() int *ptr; ptr = (int*)malloc(sizeof(int)*4); ptr = realloc(ptr,sizeof(int)*2); return 0;

A.
2
B.
4
C.
8
Answer
D.
none of the mentioned

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board