Computer Sciences > Gate 2018 > Structure
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 this program is:
A
0, c
B
0, a+2
C
'0', 'a+2'
D
'0', 'c'

Correct : Structure

Similar Questions

Consider the C struct defines below: struct data { &nbsp; &nbsp; int marks [100] ; &nbsp; &nbsp; char grade; &nbsp; &nbsp; int cnumber; }; struct data stu...
#205 MCQ
Consider the C struct defines below: struct data { &nbsp; &nbsp; int marks [100] ; &nbsp; &nbsp; char grade; &nbsp; &nbsp; int cnumber; }; struct data stu...
#205 MCQ
Consider the C struct defines below: struct data { &nbsp; &nbsp; int marks [100] ; &nbsp; &nbsp; char grade; &nbsp; &nbsp; int cnumber; }; struct data stu...
#205 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......