1
GATE CSE 2003
MCQ (Single Correct Answer)
+1
-0.3
For a pipelined $$CPU$$ with a single $$ALU$$, consider the following situations
$$1.\,\,\,\,\,$$ The $$j+1$$ instruction uses the result of the $$j$$-$$th$$ instruction as an operand
$$2.\,\,\,\,\,$$ The execution of a conditional jump instruction
$$3.\,\,\,\,\,$$ The $$j$$-$$th$$ and $$j+1$$ instruction require the $$ALU$$ at the same time

Which of the above can cause a hazard?

A
$$1$$ and $$2$$ only
B
$$2$$ and $$3$$ only
C
$$3$$ only
D
ALL the three
2
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
Let S be a stack of size n >= 1. Starting with the empty stack, suppose we push the first n natural numbers in sequence, and then perform n pop operations. Assume that Push and Pop operations take X seconds each, and Y seconds elapse between the end of one such stack operation and the start of the next operation. For m >= 1, define the stack-life of m as the time elapsed from the end of Push(m) to the start of the pop operation that removes m from S. The average stack-life of an element of this stack is
A
n(X + Y)
B
3Y + 2X
C
n(X + Y) - X
D
Y + 2X
3
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
Consider the function f defined below.
struct item { 
      int data; 
      struct item * next; 
}; 

int f(struct item *p) { 
      return ((p == NULL) || (p ->next == NULL) || 
        ((p->data <= p -> next -> data) && 
        f(p-> next))); 
}
For a given linked list p, the function f returns 1 if and only if
A
the list is empty or has exactly one element
B
the elements in the list are sorted in non-decreasing order of data value
C
the elements in the list are sorted in non-increasing order of data value
D
not all elements in the list have the same data value
4
GATE CSE 2003
MCQ (Single Correct Answer)
+1
-0.3
Consider the following graph among the following sequences
I. a b e g h f
II. a b f e h g
III. a b f h g e
IV. a f g h b e
GATE CSE 2003 Data Structures - Graphs Question 24 English What are depth first traversals of the above graph?
A
I, II and IV only
B
I and IV only
C
II, III and IV only
D
I, III and IV only
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12