1
GATE CSE 2003
MCQ (Single Correct Answer)
+1
-0.3
Assume the following C variable declaration

int * A[10], B[10][10];

Of the following expressions

I. A[2]
II. A[2] [3]
III. B[1]
IV. B[2] [3]

Which will not give compile-time errors if used as left hand sides of assignment statements in a C program?
A
I, II, and IV only
B
II, III, and IV only
C
II and IV only
D
IV only
2
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions.
global int i = 100, j = 5;
void P(x) {
    int i = 10;
    print(x + 10);
    i = 200;
    j = 20;
    print (x);
}
main() {
    P(i + j);
}
If the programming language uses dynamic scoping and call by name parameter passing mechanism, the values printed by the above program are
A
115, 220
B
25, 220
C
25, 15
D
115, 105
3
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
Consider the $$NFA$$ $$M$$ shown below. GATE CSE 2003 Theory of Computation - Finite Automata and Regular Language Question 50 English

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$$
4
GATE CSE 2003
MCQ (Single Correct Answer)
+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.