1
GATE CSE 2019
Numerical
+2
-0
Consider the following C program:

       #include < stdio.h >
       int main()
       {
           int a[] = {2, 4, 6, 8, 10} ;
           int i, sum = 0, *b = a + 4 ;
           for (i = 0; i < 5; i++)
                 sum = sum + (*b - i) - *(b - i) ;
           printf ("%d\n", sum) ;
           return 0 ;
        }

The output of the above C program is _________.
Your input ____
2
GATE CSE 2019
Numerical
+1
-0
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 2019
MCQ (Single Correct Answer)
+2
-0.67

Consider the following C function.

void convert(int n){

    if(n < 0)

        printf("%d",n);

    else {

        convert(n/2);

        printf("%d",n%2);

    }

}

Which one of the following will happen when the function convert is called with any positive integer n as argument?

A
It will print the binary representation of n and terminate
B
It will print the binary representation of n in the reverse order and terminate
C
It will print the binary representation of $n$ but will not terminate
D
It will not print anything and will not terminate
4
GATE CSE 2019
MCQ (Single Correct Answer)
+2
-0.67

Consider the following C program :

#include<stdio.h>

int r()

{

        static int num=7;

        return num--;

}

int main()

{

        for(r();r();r())

        printf("%od ",r());

        return 0;

}

Which one of the following values will be displayed on execution of the programs?

A
41
B
52
C
63
D
630
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12