1
GATE CSE 2025 Set 2
Numerical
+1
-0
int x = 126, y = 105;
do{
   if(x > y) x = x - y;
   else y = y - x;
}while(x!=y);
printf('%d", x);

The output of the given C code segment is __________. (Answer in integer)

Your input ____
2
GATE CSE 2025 Set 2
Numerical
+2
-0

Consider the following C program :

#include <stdio.h>
int main( ) {
    int a;
    int arr[5]={30,50,10};
    int *ptr;
    ptr = &arr[0] + 1;
    a = *ptr;
    (*ptr)++;
    ptr++;
    printf("%d",a + (*ptr) + arr[1]);
    return 0;
}

The output of the above program is _________. (Answer in integer)

Your input ____
3
GATE CSE 2025 Set 2
Numerical
+2
-0

Consider the following C program :

#include <stdio.h>
int g(int n) {
    return (n+10);
}
    int f(int n) {
    return g(n*2);
}
int main() {
    int sum, n;
    sum=0;
    for (n=1; n<3; n++)
    sum += g(f(n));
    printf("%d", sum);
    return 0;
}

The output of the given C program is ________. (Answer in integer)

Your input ____
4
GATE CSE 2025 Set 2
MCQ (Single Correct Answer)
+1
-0.33

Which ONE of the following languages is accepted by a deterministic pushdown automaton?

A
Any regular language.
B
Any context-free language.
C
Any language accepted by a non-deterministic pushdown automaton.
D
Any decidable language.
EXAM MAP