Time Left - 15:00 mins
NIELIT STQC 2021 Quiz-40
Attempt now to get your rank among 113 students!
Question 1
Identify the language generated by the following grammar, where S is the start variable:
S → aSc | TB
T → aTb | ϵ
B → bb | cc | bc
Question 2
Assume that a certain process executes the following code segment.
For( i =0, i<= 8, i++)
fork() ;
The number of new processes created is _______
For( i =0, i<= 8, i++)
fork() ;
The number of new processes created is _______
Question 3
Consider the page sequence 4,3,2,1,4,3,5,4,3,2,1,5, if FIFO page replacement algorithm is used and frame size is 3(all initially empty), then the percentage of page fault is:-
Question 4
A three bit pseudo random number generator is shown in the figure. Initially the value of output y = y2y1y0 is set to 111. The value of output y after three clock cycles is
Question 5
Which of the following is correct?
Question 6
What is the value printed by the following C program?
#include<stdio.h>
int fun(int *a , int n)
{
if(n<=0)
return 0;
else if(*a % 3 != 0)
{
return *a + f(a+1,n-1);
}
else
{
return *a - f(a+1,n-1);
}
}
int main()
{
int a[]= {12,4,5,6,15};
printf(“%d”,fun(a,5));
return 0;
}
#include<stdio.h>
int fun(int *a , int n)
{
if(n<=0)
return 0;
else if(*a % 3 != 0)
{
return *a + f(a+1,n-1);
}
else
{
return *a - f(a+1,n-1);
}
}
int main()
{
int a[]= {12,4,5,6,15};
printf(“%d”,fun(a,5));
return 0;
}
Question 7
Approximate using trapezoidal rule with four subintervals. (upto 4 decimal places)
Question 8
A packet of 20 batteries is known to include 4 batteries that are defective. If 8 batteries are randomly chosen and tested, the probability of finding among them not more than 1 defective battery is
Question 9
For any a, b in abelian group (ab)2=
Question 10
Which of the following is true about the following two graphs
- 113 attempts
- 0 upvotes
- 1 comment
Tags :
GATE & PSU CSGeneralNov 7GATE & PSU CS