Question 1 of 65
The expenditure on the project _____ as follows: equipment Rs. 20 lakhs, salaries Rs. 12 lakhs, and contingency Rs. 3 lakhs.
Mock test · GATE marking
You have submitted this test.See your result
This browser is not letting the page save anything. The test will work, but a refresh would lose your answers, and the result cannot be shown after you submit.
The clock starts when you press Start and does not stop. An answer counts only after Save & Next or Mark for Review & Next.
The expenditure on the project _____ as follows: equipment Rs. 20 lakhs, salaries Rs. 12 lakhs, and contingency Rs. 3 lakhs.
The search engine's business model ___________ around the fulcrum of trust.
Two cars start at the same time from the same location and go in the same direction. The speed of the first car is and the speed of the second car is . The number of hours it takes for the distance between the two cars to be is _____.
Ten friends planned to share equally the cost of buying a gift for their teacher. When two of them decided not to contribute, each of the other friends had to pay Rs 150 more. The cost of the gift was Rs. _____.
A court is to a judge as _____________ is to a teacher.
The police arrested four criminals - P, Q, R and S. The criminals knew each other. They made the following statements:
P says "Q committed the crime."
Q says "S committed the crime."
R says "I did not do it."
S says "What Q said about me is false."
Assume only one of the arrested four committed the crime and only one of the statements made above is true. Who committed the crime?
"A recent High Court judgement has sought to dispel the idea of begging as a disease - which leads to its stigmatization and criminalization - and to regard it as a symptom. The underlying disease is the failure of the state to protect citizens who fall through the social security net."
Which one of the following statements can be inferred from the given passage?
In a college, there are three student clubs. Sixty students are only in the Drama club, 80 students are only in the Dance club, 30 students are only in the Maths club, 40 students are in both Drama and Dance clubs, 12 students are in both Dance and Maths clubs, 7 students are in both Drama and Maths clubs, and 2 students are in all the clubs. If 75% of the students in the college are not in any of these clubs, then the total number of students in the college is
Three of the five students allocated to a hostel put in special requests to the warden. Given the floor plan of the vacant rooms, select the allocation plan that will accommodate all their requests.
Request by X: Due to pollen allergy, I want to avoid a wing next to the garden.
Request by Y: I want to live as far from the washrooms as possible, since I am very sensitive to smell.
Request by Z: I believe in Vaastu and so want to stay in the South-west wing.
The shaded rooms are already occupied. WR is washroom.
A certain processor uses a fully associative cache of size . The cache block size is . Assume that the main memory is byte addressable and uses a -bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor?
Which one of the following kinds of derivation is used by LR parsers?
In 16-bit 2's complement representation, the decimal number is:
Let . Let . Consider the following two statements on .
I.
II.
Which of the above statements is/are TRUE?
Which one of the following is NOT a valid identity?
If is a regular language over , which one of the following languages is NOT regular?
Consider , where and are all in sign-magnitude form. and are each represented in bits. To avoid overflow, the representation of would require a minimum of:
Let be a square matrix. Consider the following two statements on .
I. is invertible.
II. Determinant of is non-zero.
Which one of the following is TRUE?
Let be an arbitrary group. Consider the following relations on :
: , if and only if such that
: , if and only if
Which of the above is/are equivalence relation/relations?
Consider the following two statements about database transaction schedules:
I. Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable.
II. Timestamp-ordering concurrency control protocol with Thomas' Write Rule can generate view serializable schedules that are not conflict serializable.
Which of the above statements is/are TRUE?
Let be an undirected complete graph on vertices, where . Then, the number of different Hamiltonian cycles in is equal to
Compute
Which one of the following statements is NOT correct about the B+ tree data structure used for creating an index of a relational database table?
For , let us consider the regular language . Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for ?
Which of the following protocol pairs can be used to send and retrieve e-mails (in that order)?
The following C program is executed on a Unix/Linux system:
#include <unistd.h>
int main()
{
int i;
for (i = 0; i < 10; i++)
if (i % 2 == 0) fork();
return 0;
}
The total number of child processes created is ________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following C program:
#include <stdio.h>
int jumble(int x, int y){
x = 2 * x + y;
return x;
}
int main(){
int x = 2, y = 5;
y = jumble(y, x);
x = jumble(y, x);
printf("%d \n", x);
return 0;
}
The value printed by the program is ________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider the grammar given below:
Let and be indexed as follows:
| Symbol | ||||
|---|---|---|---|---|
| Index | 3 | 2 | 1 | 0 |
Compute the set of the non-terminal and write the index values for the symbols in the set in descending order. (For example, if the set is , then the answer should be 3210)
Answer: ________.
A number: digits, one decimal point and an optional minus sign at the start.
An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to 2 decimal places) is ________.
A number: digits, one decimal point and an optional minus sign at the start.
The value of is ________.
A number: digits, one decimal point and an optional minus sign at the start.
Two numbers are chosen independently and uniformly at random from the set . The probability (rounded off to 3 decimal places) that their 4-bit (unsigned) binary representations have the same most significant bit is ___________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100.
P1 P2 P3
: : :
: : :
D = D + 20 D = D - 50 D = D + 10
: : :
: : :
The processes are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y - X is _____________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following C program:
#include <stdio.h>
int main(){
int arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 5}, *ip = arr + 4;
printf("%d\n", ip[1]);
return 0;
}
The number that will be displayed on execution of the program is ___________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider a sequence of 14 elements: .
The subsequence sum . Determine the maximum of , where . (Divide and conquer approach may be used.)
Answer: ________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following C function.
void convert(int n){
if (n < 0)
printf("%d", n);
else {
convert(n / 2);
printf("%d", n % 2);
}
}
Which one of the following will happen when the function convert is called with any positive integer n as argument?
Consider the following C program:
#include <stdio.h>
int r(){
static int num = 7;
return num--;
}
int main(){
for (r(); r(); r())
printf("%d", r());
return 0;
}
Which one of the following values will be displayed on execution of the programs?
Consider three machines M, N, and P with IP addresses 100.10.5.2, 100.10.5.5, and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the three machines. Which one of the following is true?
Suppose that in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y in its subnet. Which one of the following techniques can be used for this?
Which one of the following languages over is NOT context-free?
Let the set of functional dependencies hold on a relation schema . is not in BCNF. Suppose is decomposed into two schemas and , where and .
Consider the two statements given below.
I. Both and are in BCNF
II. Decomposition of into and is dependency preserving and lossless
Which of the above statements is/are correct?
Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressable. The page size is 8 kB and the word size is 4 bytes. The Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how many distinct virtual addresses can be translated without any TLB miss?
Consider the following sets:
: Set of all recursively enumerable languages over the alphabet
: Set of all syntactically valid C programs
: Set of all languages over the alphabet
: Set of all non-regular languages over the alphabet
Which of the above sets are uncountable?
Consider the first order predicate formula :
Here '' denotes that ' divides ', where and are integers. Consider the following sets:
:
: Set of all positive integers
: Set of all integers
Which of the above sets satisfy ?
Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let and be the placeholders for the non-terminals or in the following table:
| Production rule | Semantic action |
|---|---|
Which one of the following are the appropriate choices for and ?
There are unsorted arrays: . Assume that is odd. Each of contains distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing the median of the medians of is
Let be any connected, weighted, undirected graph.
I. has a unique minimum spanning tree, if no two edges of have the same weight.
II. has a unique minimum spanning tree, if, for every cut of , there is a unique minimum-weight edge crossing the cut.
Which of the above two statements is/are TRUE?
Consider the following snapshot of a system running concurrent processes. Process is holding instances of a resource , . Assume that all instances of are currently in use. Further, for all , process can place a request for at most additional instances of while holding the instances it already has. Of the processes, there are exactly two processes and such that . Which one of the following conditions guarantees that no other process apart from and can complete execution?
Consider the following statements:
I. The smallest element in a max-heap is always at a leaf node
II. The second largest element in a max-heap is always a child of the root node
III. A max-heap can be constructed from a binary search tree in time
IV. A binary search tree can be constructed from a max-heap in time
Which of the above statements are TRUE?
Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below:
| Process | Arrival time | CPU burst time |
|---|---|---|
| P1 | 0 | 3 |
| P2 | 1 | 1 |
| P3 | 3 | 3 |
| P4 | 4 | Z |
These processes are run on a single processor using preemptive Shortest Remaining Time First scheduling algorithm. If the average waiting time of the processes is 1 millisecond, then the value of is ________.
A number: digits, one decimal point and an optional minus sign at the start.
The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is , and the disk block address is -bits long. The maximum possible file size is (rounded off to 1 decimal place) _________ GB.
A number: digits, one decimal point and an optional minus sign at the start.
Consider the augmented grammar given below:
Let . The number of items in the set is: ________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following matrix:
The absolute value of the product of Eigen values of is ________.
A number: digits, one decimal point and an optional minus sign at the start.
A certain processor deploys a single-level cache. The cache block size is 8 words and the word size is 4 bytes. The memory system uses a 60-MHz clock. To service a cache miss, the memory controller first takes 1 cycle to accept the starting address of the block, it then takes 3 cycles to fetch all the eight words of the block, and finally transmits the words of the requested block at the rate of 1 word per cycle. The maximum bandwidth for the memory system when the program running on the processor issues a series of read operations is __________ .
A number: digits, one decimal point and an optional minus sign at the start.
Let be a full binary tree with 8 leaves. (A full binary tree has every level full.) Suppose two leaves and of are chosen uniformly and independently at random. The expected value of the distance between and in (i.e., the number of edges in the unique path between and ) is (rounded off to 2 decimal places) ________.
A number: digits, one decimal point and an optional minus sign at the start.
Suppose is distributed uniformly in the open interval . The probability that the polynomial has only real roots is (rounded off to 1 decimal place) ________.
A number: digits, one decimal point and an optional minus sign at the start.
Let be the set of all bijections from to , where denotes the identity function, i.e. . Let denote composition on functions. For a string , let .
Consider the language . The minimum number of states in any DFA accepting is ________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider that 15 machines need to be connected in a LAN using 8-port Ethernet switches. Assume that these switches do not have any separate uplink ports. The minimum number of switches needed is ________.
A number: digits, one decimal point and an optional minus sign at the start.
What is the minimum number of 2-input NOR gates required to implement a 4-variable function expressed in sum-of-minterms form as ? Assume that all the inputs and their complements are available. Answer: ________.
A number: digits, one decimal point and an optional minus sign at the start.
A relational database contains two tables Student and Performance as shown below:
Student
| Roll_no. | Student_name |
|---|---|
| 1 | Amit |
| 2 | Priya |
| 3 | Vinit |
| 4 | Rohan |
| 5 | Smita |
Performance
| Roll_no. | Subject_code | Marks |
|---|---|---|
| 1 | A | 86 |
| 1 | B | 95 |
| 1 | C | 90 |
| 2 | A | 89 |
| 2 | C | 92 |
| 3 | C | 80 |
The primary key of the Student table is Roll_no.. For the Performance table, the columns Roll_no. and Subject_code together form the primary key. Consider the SQL query given below:
SELECT S.Student_name, sum(P.Marks)
FROM Student S, Performance P
WHERE P.Marks > 84
GROUP BY S.Student_name;
The number of rows returned by the above SQL query is ________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following C program:
#include <stdio.h>
int main() {
float sum = 0.0, j = 1.0, i = 2.0;
while (i/j > 0.0625) {
j = j + j;
sum = sum + i/j;
printf("%f\n", sum);
}
return 0;
}
The number of times the variable sum will be printed, when the above program is executed, is ________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following C program:
#include <stdio.h>
int main()
{
int a[] = {2, 4, 6, 8, 10};
int i, sum = 0, *b = a + 4;
for (i = 0; i < 5; i++)
sum = sum + (*b - i) - *(b - i);
printf("%d\n", sum);
return 0;
}
The output of the above C program is ________.
A number: digits, one decimal point and an optional minus sign at the start.
In an RSA cryptosystem, the value of the public modulus parameter is 3007. If it is also known that , where denotes Euler's Totient Function, then the prime factor of which is greater than 50 is ________.
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following relations , and :
P
| X | Y | Z |
|---|---|---|
| X1 | Y1 | Z1 |
| X1 | Y1 | Z2 |
| X2 | Y2 | Z2 |
| X2 | Y4 | Z4 |
Q
| X | Y | T |
|---|---|---|
| X2 | Y1 | 2 |
| X1 | Y2 | 5 |
| X1 | Y1 | 6 |
| X3 | Y3 | 1 |
R
| Y | V |
|---|---|
| Y1 | V1 |
| Y3 | V2 |
| Y2 | V3 |
| Y2 | V2 |
How many tuples will be returned by the following relational algebra query?
Answer: ________.
A number: digits, one decimal point and an optional minus sign at the start.
Not saved yet. Press Save & Next (or Mark for Review & Next) to record this selection.
M
Your answers are being marked.
The result page did not open. Your answers are saved in this browser.Open the result