1
GATE CSE 2022
MCQ (Single Correct Answer)
+1
-0.33

What is printed by the following ANSI C program?


#include <stdio.h>
int main(int argc, char *argv[ ]) {
   int x = 1, z[2] = {10, 11};
   int *p = NULL;
   p = &x;
   *p = 10;
   p = &z[1];
   *(&z[0] + 1) += 3;
   printf("%d, %d, %d\n", x, z[0], z[1]);
   return 0;
} 

A
1, 10, 11
B
1, 10, 14
C
10, 14, 11
D
10, 10, 14
2
GATE CSE 2019
Numerical
+1
-0.33
Consider the following C program :

#include < stdio.h >
 int main ()  {
            int arr [] = {1,2,3,4,5,6,7,8,9,0,1,2,5}, *ip = arr+4;
             printf ("%d\n", ip[1]);
             return 0;
}


The number that will be displayed on execution of the program is _______.
Your input ____
3
GATE CSE 2018
MCQ (Single Correct Answer)
+1
-0.3
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'
4
GATE CSE 2016 Set 1
MCQ (Single Correct Answer)
+1
-0.3
Consider the following C program
void f(int, short);
void main()
{
    int i = 100;
    short s = 12;
    short *p = &s;
    __________ ;    // call to f()
}
Which one of the following expressions, when placed in the blank above, will NOT result in a type checking error?
A
f(s,*s)
B
i = f(i,s)
C
f(i,*s)
D
f(i,*p)
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
CBSE
Class 12