?
This program will allocate the memory of . . . . . . . . bytes for pointer "ptr".
This program will allocate the memory of . . . . . . . . bytes for pointer "ptr".
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *ptr;
ptr = (int*)malloc(sizeof(int)*4);
ptr = realloc(ptr,sizeof(int)*2);
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *ptr;
ptr = (int*)malloc(sizeof(int)*4);
ptr = realloc(ptr,sizeof(int)*2);
return 0;
}
Join the Discussion
Login to post a comment or share your explanation.
Login