1
GATE CSE 2011
MCQ (Single Correct Answer)
+1
-0.3
Let the time taken to switch between user and kernel modes of execution be $${t_1}$$ while the time taken to switch between two processes be $${t_2}$$.

Which of the following is TRUE?

A
$${t_1} > {t_2}$$
B
$${t_1} = {t_2}$$
C
$${t_1} < {t_2}$$
D
Nothing can be said about the relation between $${t_1}$$ and $${t_2}.$$
2
GATE CSE 2011
MCQ (Single Correct Answer)
+2
-0.6
Consider the following table of arrival time and burst time for three processes $$P0,P1$$ and $$P2$$.
Process Arrival Time Burst Time
P0 0 ms 9 ms
P1 1 ms 4 ms
P2 2 ms 9 ms

The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only a arrival or completion of processes. What is the average waiting time for the three processes?

A
$$5.0$$ $$ms$$
B
$$4.33$$ $$ms$$
C
$$6.33$$ $$ms$$
D
$$7.33$$ $$ms$$
3
GATE CSE 2011
MCQ (Single Correct Answer)
+1
-0.3
What does the following fragment of C-program print?
char c[ ] = "GATE2011";
char *p = c;
printf("%s", p + p[3] - p[1]);
A
GATE2011
B
E2011
C
2011
D
01
4
GATE CSE 2011
MCQ (Single Correct Answer)
+2
-0.6
Consider the following recursive C function that takes two arguments:
unsigned int foo (unsigned int n, unsigned int r) {
  if (n > 0) return((n % r) + foo(n/r, r));
  else return 0;
}
What is the return value of the function foo when it is called as foo (345, 10)?
A
345
B
12
C
5
D
3
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