Nguyễn Hồ Ngọc Anh
Member
In this program the two printed memory locations has the difference of ___ bytes.
A. 1
B. 4
C. can not be determined
D. none of the mentioned
Code:
#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;
}
B. 4
C. can not be determined
D. none of the mentioned