1
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Consider the following program segment. Here R1, R2 and R3 are the general purpose registers. GATE CSE 2006 Computer Organization - Machine Instructions and Addressing Modes Question 18 English

Assume that the content of memory location $$3000$$ is $$10$$ and the content of the register $$R3$$ is $$2000$$. The content of each of the memory locations from $$2000$$ to $$2010$$ is $$100.$$ The program is loaded from the memory location $$1000.$$ All the numbers are in decimal.

Assume that the memory is word addressable. After the execution of this program, the content of memory location $$2010$$ is

A
$$100$$
B
$$101$$
C
$$102$$
D
$$110$$
2
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Consider the following program segment. Here R1, R2 and R3 are the general purpose registers. GATE CSE 2006 Computer Organization - Machine Instructions and Addressing Modes Question 19 English

Assume that the content of memory location $$3000$$ is $$10$$ and the content of the register $$R3$$ is $$2000$$. The content of each of the memory locations from $$2000$$ to $$2010$$ is $$100.$$ The program is loaded from the memory location $$1000.$$ All the numbers are in decimal.

Assume that the memory is word addressable. The number of memory references for accessing the data in executing the program completely is

A
$$10$$
B
$$11$$
C
$$20$$
D
$$21$$
3
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
An implementation of a queue Q, using two stacks S1 and S2, is given below:
void insert(Q, X){
  push(S1, X);
}

void delete(Q){
 if(stack - empty(S1)) then {
   print("Q is empty");
   return;
 }else while (!(stack - empty(S1))){
   X = pop(S1);
   push(S2, X);
 }
 X = pop(S2);
}
Let n insert and $$m( \le n)$$ delete operations be performed in an arbitrary order on an empty queue Q. Let x and y be the number of push and pop operations performed respectively in the process. Which one of the following is true for all m and n?
A
$$n + m \le x \le 2n$$ and $$2m \le y \le n + m$$
B
$$n + m \le x \le 2n$$ and $$2m \le y \le 2n$$
C
$$2m \le x \le 2n$$ and $$2m \le y \le n + m$$
D
$$2m \le x \le 2n$$ and $$2m \le y \le 2n$$
4
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
The following function computes the value of mCn correctly for all legal values m and n (m≥1,n≥0 and m>n)
int func(int m, int n) 
{ 
     if (E) return 1; 
     else return(func(m -1, n) + func(m - 1, n - 1)); 
} 
In the above function, which of the following is the correct expression for E?
A
(n = = 0) || (m = = 1)
B
(n = = 0) && (m = = 1)
C
(n = = 0) || (m = = n)
D
(n = = 0) && (m = = n)
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12