Sail E0 Webinar
Question


What will be the output of the program?


#include<stdio.h>
int main()
{
int arr[3] = {2, 3, 4};
char *p;
p = arr;
p = (char*)((int*)(p));
printf("%d, ", *p);
p = (int*)(p+1);
printf("%d", *p);
return 0;
}
Options:
A .  2, 3
B .  2, 0
C .  2, Garbage value
D .  0, 0
Answer: Option B

No answer description available for this question. 



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers