1
GATE CSE 2016 Set 1
+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)
2
GATE CSE 2016 Set 1
Numerical
+1
-0
Consider the following C program.
#include < stdio.h >
void mystery(int *ptra, int *ptrb) {
int *temp;
temp = ptrb;
ptrb = ptra;
ptra = temp;
}
int main() {
int a=2016, b=0, c=4, d=42;
mystery(&a, &b);
if (a < c)
mystery(&c, &a);
mystery(&a, &d);
printf("%d\n", a);
}
The output of the program is _____________.
3
GATE CSE 2016 Set 1
+1
-0.3
Which of the following languages is generated by the given grammar? $$S \to aS|bS|\varepsilon$$\$
A
$$\left\{ {{a^n}{b^m}|n,m \ge 0} \right\}$$
B
$$\left\{ {w \in \left\{ {a,b} \right\}{}^ * |w} \right.$$ has equal number of $$a’s$$ and $$\left. {b's} \right\}$$
C
$$\left\{ {{a^n}|n \ge 0} \right\} \cup \left\{ {{b^n}|n \ge 0} \right\} \cup \left\{ {{a^n}{b^n}|n \ge 0} \right\}$$
D
$${\left\{ {a,b} \right\}^ * }$$
4
GATE CSE 2016 Set 1
+1
-0.3
Which of the following decision problems are undecidable?

$$\,\,\,\,\,\,\,\,\,\,{\rm I}.\,\,\,\,\,\,\,\,\,\,$$ Given $$NFAs$$ $${N_1}$$ and $${N_2},$$ is $$L\left( {{N_1}} \right) \cap L\left( {{N_2}} \right) = \Phi ?$$
$$\,\,\,\,\,\,\,\,{\rm I}{\rm I}.\,\,\,\,\,\,\,\,\,\,$$Given a $$CFG\,G = \left( {N,\sum {\,,P} ,S} \right)$$ and string $$x \in \sum {^ * } ,$$ does
$$\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,$$ $$x \in L\left( G \right)?$$
$$\,\,\,\,\,\,{\rm I}{\rm I}{\rm I}.\,\,\,\,\,\,\,\,\,\,$$ Given $$CFGs\,\,{G_1}$$ and $${G_2},$$ is $$L\left( {{G_1}} \right) = L\left( {{G_2}} \right)?$$
$$\,\,\,\,\,\,{\rm I}V.\,\,\,\,\,\,\,\,\,\,$$ Given a $$TM$$ $$M,$$ is $$L\left( M \right) = \Phi ?$$

A
$${\rm I}$$ and $${\rm IV}$$ only
B
$${\rm II}$$ and $${\rm I}$$$${\rm I}$$$${\rm I}$$ only
C
$${\rm I}$$$${\rm I}$$$${\rm I}$$ and $${\rm IV}$$ only
D
$${\rm II}$$ and $${\rm IV}$$ only
GATE CSE Papers
2023
2022
2020
2019
2018
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
EXAM MAP
Medical
NEET
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12