?
In this program the two printed memory locations has the difference of . . . . . . . . bytes.
In this program the two printed memory locations has the difference of . . . . . . . . bytes.
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *ptr;
ptr = (int*)malloc(sizeof(int)*2);
printf("%p\n",ptr);
printf("%p\n",ptr+1);
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *ptr;
ptr = (int*)malloc(sizeof(int)*2);
printf("%p\n",ptr);
printf("%p\n",ptr+1);
return 0;
}
Join the Discussion
Login to post a comment or share your explanation.
Login