Computer Sciences > Gate 2018 > Structure
Consider the following C program.
The output of this program is:
#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;
}
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:
Correct : Structure
Similar Questions
Consider the C struct defines below:
struct data {
int marks [100] ;
char grade;
int cnumber;
};
struct data stu...
Consider the C struct defines below:
struct data {
int marks [100] ;
char grade;
int cnumber;
};
struct data stu...
Consider the C struct defines below:
struct data {
int marks [100] ;
char grade;
int cnumber;
};
struct data stu...
Total Unique Visitors
Loading......