1
GATE CSE 2013
MCQ (Single Correct Answer)
+2
-0.6
The procedure given below is required to find and replace certain characters inside an input character string supplied in array $$A.$$ The characters to be replaced are supplied in array $$oldc,$$ while their respective replacement characters are supplied in array $$newc.$$ Array $$A$$ has a fixed length of five characters, while arrays $$oldc$$ and $$newc$$ contain three characters each. However, the procedure is flawed. void find_and_replace (char $$^ * A,$$ char $$^ * oldc,$$, char $$^ * newc$$)
$$\left\{ \, \right.$$ for (int $$i=0; i<5; i++$$)
for (int $$j=0; j<3; j++$$)
if ( $$A$$ [ $$i$$ ] $$==oldc$$ [ $$j$$ ] $$A$$ [ $$i$$ ]
$$=newc$$ [ $$j$$ ]; $$\left. \, \right\}$$
$$\left\{ \, \right.$$ for (int $$i=0; i<5; i++$$)
for (int $$j=0; j<3; j++$$)
if ( $$A$$ [ $$i$$ ] $$==oldc$$ [ $$j$$ ] $$A$$ [ $$i$$ ]
$$=newc$$ [ $$j$$ ]; $$\left. \, \right\}$$
The procedure is tested with the following four test cases;
$$\eqalign{
& \left( 1 \right)\,\,\,oldc = ''abc'',\,\,newc\, = \,''dab'' \cr
& \left( 2 \right)\,\,\,oldc\, = \,''cdc'',\,\,newc\, = \,''bed'' \cr
& \left( 3 \right)\,\,\,oldc\, = \,''bca'',\,newc\, = \,''cda'' \cr
& \left( 4 \right)\,\,\,oldc\, = \,''abc'',\,newc\, = \,''bac'' \cr} $$
The tester now tests the program on all input strings of length five consisting of characters $$'a', 'b', 'c', 'd'$$ and $$'c'$$ with duplicates allowed. If the tester carries out this testing with four test cases given above, how many test cases will be able to capture the flaw?
2
GATE CSE 2013
MCQ (Single Correct Answer)
+2
-0.6
Which of the following is/are undecidable?
$$1.$$ $$G$$ is a $$CFG.$$ Is $$L\left( G \right) = \Phi ?$$
$$2.$$ $$G$$ is a $$CFG.$$ Is $$L\left( G \right) = \sum {{}^ * } ?$$
$$3.$$ $$M$$ is a Turing Machine. Is $$L(M)$$ regular?
$$4.$$ $$A$$ is a $$DFA$$ and $$N$$ is an $$NFA.$$
Is $$L(A)=L(N)?$$
$$1.$$ $$G$$ is a $$CFG.$$ Is $$L\left( G \right) = \Phi ?$$
$$2.$$ $$G$$ is a $$CFG.$$ Is $$L\left( G \right) = \sum {{}^ * } ?$$
$$3.$$ $$M$$ is a Turing Machine. Is $$L(M)$$ regular?
$$4.$$ $$A$$ is a $$DFA$$ and $$N$$ is an $$NFA.$$
Is $$L(A)=L(N)?$$
3
GATE CSE 2013
MCQ (Single Correct Answer)
+1
-0.3
Consider the languages $${L_1} = \phi $$ and $${L_2} = \left\{ a \right\}.$$ Which one of the following represents $${L_1}\,L_2^ * UL_1^ * ?$$
4
GATE CSE 2013
MCQ (Single Correct Answer)
+2
-0.6
Consider the following languages
$${L_1} = \left\{ {{0^p}{1^q}{0^r}\left| {p,q,r \ge 0} \right.} \right\}$$
$${L_2} = \left\{ {{0^p}{1^q}{0^r}\left| {p,q,r \ge 0,p \ne r} \right.} \right\}$$
$${L_1} = \left\{ {{0^p}{1^q}{0^r}\left| {p,q,r \ge 0} \right.} \right\}$$
$${L_2} = \left\{ {{0^p}{1^q}{0^r}\left| {p,q,r \ge 0,p \ne r} \right.} \right\}$$
Which one of the following statements is FALSE?
Paper analysis
Total Questions
Algorithms
7
Compiler Design
2
Computer Networks
5
Computer Organization
5
Data Structures
1
Database Management System
4
Digital Logic
3
Discrete Mathematics
11
Operating Systems
4
Programming Languages
1
Software Engineering
3
Theory of Computation
5
More papers of GATE CSE
GATE CSE 2024 Set 2
GATE CSE 2024 Set 1
GATE CSE 2023
GATE CSE 2022
GATE CSE 2021 Set 2
GATE CSE 2021 Set 1
GATE CSE 2020
GATE CSE 2019
GATE CSE 2018
GATE CSE 2017 Set 2
GATE CSE 2017 Set 1
GATE CSE 2016 Set 2
GATE CSE 2016 Set 1
GATE CSE 2015 Set 1
GATE CSE 2015 Set 3
GATE CSE 2015 Set 2
GATE CSE 2014 Set 2
GATE CSE 2014 Set 3
GATE CSE 2014 Set 1
GATE CSE 2013
GATE CSE 2012
GATE CSE 2011
GATE CSE 2010
GATE CSE 2009
GATE CSE 2008
GATE CSE 2007
GATE CSE 2006
GATE CSE 2005
GATE CSE 2004
GATE CSE 2003
GATE CSE 2002
GATE CSE 2001
GATE CSE 2000
GATE CSE 1999
GATE CSE 1998
GATE CSE 1997
GATE CSE 1996
GATE CSE 1995
GATE CSE 1994
GATE CSE 1993
GATE CSE 1992
GATE CSE 1991
GATE CSE 1990
GATE CSE 1989
GATE CSE 1988
GATE CSE 1987
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