ExamVeda
Login
Home
This question belongs to Computer Science Linux
Linux
?

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;
}

Answer & Solution
Correct Answer: Option B
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.