What is printed by the following ANSI C program?
c
- A1, 10, 11
- B1, 10, 14
- C10, 14, 11
- D10, 10, 14
Programming in CPointers, Multi-Dimensional Arrays, StructuresMCQ1 mark · −1/3 if wrongMedium
1#include<stdio.h>
2int main(int argc, char *argv[ ])
3{
4 int x = 1, z[2] = {10, 11};
5 int *p = NULL;
6 p = &x;
7 *p = 10;
8 p = &z[1];
9 *(&z[0] + 1) += 3;
10 printf("%d, %d, %d\n", x, z[0], z[1]);
11 return 0;
12}
13A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.