Views:0|Rating:0.00|View Time:4:58Minutes|Likes:0|Dislikes:0
In this video questions which were asked in the exam of GATE 2018 are solved.

Question :- Consider the following C program
# include {stdio.h}
struct Ournode{
char x,y,z;
};
int main (){
struct Ournode p = {‘1′,’0’,’a’+2};
struct Ournode *q = &p ;
printf(“%c, %c”,*((char*)q+1),*((char*)q+2));
return 0 ;
}
The output of the program is :
A. 0,c
B. 0,a+2
C. ‘0’,’a+2′
D. ‘0’,’c’

Solution is explained in the video.

Leave a Reply

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