1
GATE CSE 2021 Set 2
Numerical
+2
-0

Consider the following ANSI C program

#include <stdio.h>

int foo(int x, int y, int q)

{

if ((x <= 0 && (y <= 0))

return q;

if (x <= 0)

return foo(x, y - q, q);

if (y <= 0)

return foo(x - q, y, q);

return foo (x, y - q, q) + foo(x - q, y, q);

}

int main()
(

int r = foo(15, 15, 10);

printf("%d", r);

return 0;

}

The output of the program upon execution is ________ 

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

Consider the following ANSI C program.

#include<stdio.h>

int main(){

int arr[4][5];

int i, j;

for(i =0; i<4; i++){

for (j =0; j<5; j++){

arr [i][j] = 10*i + j;

}

}

print("%d", *(arr[1] + 9));

return 0;

}

What is the output of the above program?

A
14
B
20
C
30
D
24
3
GATE CSE 2021 Set 2
MCQ (Single Correct Answer)
+1
-0.33
Let L ⊆ {0,1}* be an arbitrary regular language accepted by a minimal DFA with k states. Which one of the following languages must necessarily be accepted by a minimal DFA with k states? 
A
{0,1}* - L
B
L.L
C
L - {01}
D
L ∪ {01}
4
GATE CSE 2021 Set 2
Numerical
+1
-0

Consider the following deterministic finite automaton (DFA).

GATE CSE 2021 Set 2 Theory of Computation - Finite Automata and Regular Language Question 15 English

The number of strings of length 8 accepted by  the above automaton is __________

Your input ____
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