1
GATE CSE 2001
MCQ (Single Correct Answer)
+2
-0.6
What is printed by the print statements in the program P1 assuming call by reference parameter passing?
Program P1()
{
     x=10;
     y=3;
     func1(y,x,x);
     print x;
     print y;
}
func1(x,y,z)
{
     y=y+4;
     z=x+y+z;
}
A
10,3
B
31,3
C
27,7
D
None of the above
2
GATE CSE 2001
MCQ (Single Correct Answer)
+2
-0.6
Consider the following program
Program P2
      var n:int;
      procedure W(var x:int)
      begin
          x=x+1;
          print x;
      end

      procedure D
      begin
          var n:int;
          n=3;
          W(n);
      end
begin     \\begin P2
      n = 10;
      D;
end
If the language has dynamic scooping and parameters are passed by reference, what will be printed by the program?
A
10
B
11
C
3
D
None of the above
3
GATE CSE 2001
MCQ (Single Correct Answer)
+2
-0.6
Consider the following problem $$X.$$ Given a Turing machine $$M$$ over the input alphabet $$\sum , $$ any state $$q$$ of $$M$$ And a word $$w\,\,\varepsilon \,\,\sum {^ * ,} $$ does the computation of $$M$$ on $$w$$ visit the state $$q''$$

Which of the following statements about $$X$$ is correct?

A
$$X$$ is decidable
B
$$X$$ is undecidable but partially decidable
C
$$X$$ is undecidable and not even partially decidable
D
$$X$$ is not a decision problem
4
GATE CSE 2001
MCQ (Single Correct Answer)
+1
-0.3
Consider the following two statements;
$${S_1}\,\,:\,\,\left\{ {{0^{2n}}\left| {n \ge 1} \right.} \right\}$$ is a regular language
$${S_2}\,\,:\,\,\left\{ {{0^m}{1^n}{0^{m + n}}\left| {m \ge 1} \right.\,\,and\,\,n \ge \left. 1 \right\}} \right.$$ is a regular language

Which of the following statements is correct?

A
Only $${S_1}$$ is correct
B
Only $${S_2}$$ is correct
C
Both $${S_1}$$ and $${S_2}$$ are correct
D
None of $${S_1}$$ and $${S_2}$$ is correct
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