Sail E0 Webinar
Question


What will be the output of the program?


#include<stdio.h>
int main()
{
int arr[2][2][2] = {10, 2, 3, 4, 5, 6, 7, 8};
int *p, *q;
p = &arr[1][1][1];
q = (int*) arr;
printf("%d, %d\n", *p, *q);
return 0;
}
Options:
A .  8, 10
B .  10, 2
C .  8, 1
D .  Garbage values
Answer: Option A

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