# Tag Archives: GATE-GATE-CS-2007

## GATE | GATE-CS-2007 | Question 85

An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes: Process Execution… Read More »

## GATE | GATE-CS-2007 | Question 54

In a simplified computer the instructions are: The computer has only two registers, and OP is either ADD or SUB. Consider the following basic block:… Read More »

## GATE | GATE-CS-2007 | Question 85

Consider the following two statements: P: Every regular grammar is LL(1) Q: Every regular set has a LR(1) grammar Which of the following is TRUE?… Read More »

## GATE | GATE-CS-2007 | Question 52

Consider the grammar with non-terminals N = {S,C,S1 },terminals T={a,b,i,t,e}, with S as the start symbol, and the following set of rules: S –> iCtSS1|a… Read More »

## GATE | GATE-CS-2007 | Question 51

Consider the following C code segment: filter_none edit close play_arrow link brightness_4 code int IsPrime(n) {   int i,n;   for(i=2;i<=sqrt(n);i++)      if(n%i == 0)       {printf(“Not Prime\n”); return… Read More »

## GATE | GATE-CS-2007 | Question 50

An array of n numbers is given, where n is an even number. The maximum as well as the minimum of these n numbers needs… Read More »

## GATE | GATE-CS-2007 | Question 49

Let w be the minimum weight among all edge weights in an undirected connected graph. Let e be a specific edge of weight w .… Read More »

## GATE | GATE-CS-2007 | Question 48

Which of the following is TRUE about formulae in Conjunctive Normal Form? (A) For any formula, there is a truth assignment for which at least… Read More »

## GATE | GATE-CS-2007 | Question 47

Consider the process of inserting an element into a Max Heap, where the Max Heap is represented by an array. Suppose we perform a binary… Read More »

## GATE | GATE-CS-2007 | Question 46

Consider the following C program segment where CellNode represents a node in a binary tree: filter_none edit close play_arrow link brightness_4 code struct CellNode  {… Read More »

## GATE | GATE-CS-2007 | Question 45

What is the time complexity of the following recursive function: filter_none edit close play_arrow link brightness_4 code int DoSomething (int n)  {   if (n <=… Read More »

## GATE | GATE-CS-2007 | Question 44

In the following C function, let n >= m. filter_none edit close play_arrow link brightness_4 code int gcd(n,m) {   if (n%m ==0) return m;     n… Read More »

## GATE | GATE-CS-2007 | Question 43

A complete n-ary tree is a tree in which each node has n children or no children. Let I be the number of internal nodes… Read More »

## GATE | GATE-CS-2007 | Question 85

Consider the following C function, what is the output? filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int f(int n) {     static int r… Read More »

## GATE | GATE-CS-2007 | Question 41

In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most efficiently, in terms of time… Read More »