Consider the following C program.
The output of this program is:
c
- A0, c
- B0, a+2
- C'0', 'a+2'
- D'0', 'c'
Programming in CPointers, Multi-Dimensional Arrays, StructuresMCQ1 mark · −1/3 if wrongMedium
1#include<stdio.h>
2struct Ournode{
3 char x,y,z;
4};
5
6int main(){
7 struct Ournode p = {'1', '0', 'a'+2};
8 struct Ournode *q = &p;
9 printf ("%c, %c", *((char*)q+1), *((char*)q+2));
10 return 0;
11}
12A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.