GATE 2020 Computer Science and IT Question Paper with answer
16. Question
Consider the codes given below:
Fun 1 (int n)
{
static int i = 0;
if(n >0)
{
i++;
fun1(n-1);
}
Return(i);
}
Fun2 (int n)
{
Static int i = 0;
If(n > 0)
{
i = I + fun1(n);
fun2(n-1)
}
Return I;
}
What the program will return when fun2(5) is called____
Answer
17. Question
Consider the following state changes for a preemptive scheduling OS.
I. Ready to running
II. Running to Ready
III. Blocked to Running
IV. Blocked to ready which of the above statement
Answer
18. Question
A new process needs to be allocated memory. The size of the process cannot be exactly fit in available holes. If memory is allocated to any of the available holes, then a new smaller hole is created. Which of the following options is correct in this context?
Answer
19. Question
A web page has some text and 4 small size images, use non-persistent HTTP connection, then the number of HTTP connection required___
Answer
20. Question
L1 ={wxyx | w, x, y ∈ (0+1)+}
L2 ={xy | x, y ∈ (a+b)*, |x=y|,x≠y}
Answer