1
GATE CSE 2003
+2
-0.6
Consider the C program shown below.
#include < stdio.h >
#define print(x) printf("%d ", x)
int x;
void Q(int z) {
z += x; print(z);
}
void P(int *y) {
int x = *y+2;
Q(x); *y = x-1;
print(x);
}
main(void) {
x = 5;
P(&x);
print(x);
}
The output of this program is
A
12 7 6
B
22 12 11
C
14 6 6
D
7 6 6
2
GATE CSE 2003
+1
-0.3
The regular expression $${0^ * }\left( {{{10}^ * }} \right){}^ *$$denotes the same set as
A
$$\left( {{1^ * }0} \right){}^ * {1^ * }$$
B
$$0 + \left( {0 + 10} \right){}^ *$$
C
$$\left( {0 + 1} \right){}^ * 10\left( {0 + 1} \right){}^ *$$
D
None of the above.
3
GATE CSE 2003
+1
-0.3
Consider the set $$\sum {^ * }$$ of all strings over the alphabet $$\,\sum { = \,\,\,\left\{ {0,\,\,\,1} \right\}.\sum {^ * } }$$ with the concatenation operator for strings
A
Does not from a group
B
Forms a non-commutative group
C
Does not have a right identity element
D
Forms a group if the empty string is removed from $${\sum {^ * } }$$
4
GATE CSE 2003
+2
-0.6
Consider the $$NFA$$ $$M$$ shown below.

Let the language accepted by $$M$$ be $$L.$$ Let $${L_1}$$ be the language accepted by the $$NFA$$, $${M_1}$$ obtained by changing the accepting state of $$M$$ to a non accepting state and by changing the non accepting state of $$M$$ to accepting states. Which of the following statements is true?

A
$${L_1} = \left\{ {0,\,1} \right\}{}^ * - L$$
B
$${L_1} = \left\{ {0,\,1} \right\}{}^ *$$
C
$${L_1} \subseteq \,L$$
D
$${L_1} = \,L$$
GATE CSE Papers
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
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
Joint Entrance Examination