GATE 2026 (Session 2)
65 questions
MCQ 35 · MSQ 11 · NAT 191-mark 30 · 2-mark 35
Questions 31–35 of 65
Consider the system of linear equations given below.
Suppose the values of and are chosen such that the system of linear equations produce multiple solutions. Then the product of and is ________. (answer in integer)
Suppose the values of and are chosen such that the system of linear equations produce multiple solutions. Then the product of and is ________. (answer in integer)
Answer: 24
The system has infinitely many (multiple) solutions only when both equations represent the same line. This means all three coefficient ratios are equal:
Take the first two ratios, : .
Take the last two ratios, : .
Case : , so .
Case : , so .
Both choices of give the same product.
Answer: 24
Take the first two ratios, : .
Take the last two ratios, : .
Case : , so .
Case : , so .
Both choices of give the same product.
Answer: 24
Consider an array . Suppose the merge sort algorithm is executed on array to sort it in increasing order. The merge sort algorithm will carry out a total of merge operations.
A merge operation on sorted left array and sorted right array is said to be void if the output of the merge operation is the elements of array followed by the elements of array .
The number of void merge operations among these merge operations is ________. (answer in integer)
A merge operation on sorted left array and sorted right array is said to be void if the output of the merge operation is the elements of array followed by the elements of array .
The number of void merge operations among these merge operations is ________. (answer in integer)
Answer: 3
A merge is void when every element of the left array is at most every element of the right array , that is, the largest of is at most the smallest of . Then the output is just followed by .
Pairs:
: output is then , not void.
: already then , void.
: not void.
: void.
Quads:
: the elements interleave, not void.
: output is then (every element of is smaller than every element of ), not void.
Final merge: : , so the output is then , void.
Merges: , of which 3 are void.
Answer: 3
Pairs:
: output is then , not void.
: already then , void.
: not void.
: void.
Quads:
: the elements interleave, not void.
: output is then (every element of is smaller than every element of ), not void.
Final merge: : , so the output is then , void.
Merges: , of which 3 are void.
Answer: 3
If an IP network uses a subnet mask of , the maximum number of IP addresses that can be assigned to network interfaces is ________. (answer in integer)
Answer: 4094
The subnet mask is . In binary it is — this gives network bits (a ).
The number of host bits , so the subnet has addresses in total. Out of these, are reserved (the all-zeros network address and the all-ones broadcast address), so they cannot be assigned to interfaces.
The usable addresses .
Answer: 4094
The number of host bits , so the subnet has addresses in total. Out of these, are reserved (the all-zeros network address and the all-ones broadcast address), so they cannot be assigned to interfaces.
The usable addresses .
Answer: 4094
The -bit single precision representation of a number is . The number in decimal representation is ________. (rounded off to two decimal places)
Answer: -60.25
Write in binary, 4 bits per hex digit:
So the 32 bits are .
Split them as 1 sign bit, 8 exponent bits and 23 mantissa bits:
The sign bit is , so the number is negative. The exponent bits are , and with bias the exponent is . The mantissa bits are , so the mantissa is .
The number is .
Answer: -60.25
So the 32 bits are .
Split them as 1 sign bit, 8 exponent bits and 23 mantissa bits:
The sign bit is , so the number is negative. The exponent bits are , and with bias the exponent is . The mantissa bits are , so the mantissa is .
The number is .
Answer: -60.25
A lexical analyzer uses the following token definitions
For the string given below,
the number of tokens (excluding ws) that will be produced by the lexical analyzer is ________. (answer in integer)
For the string given below,
the number of tokens (excluding ws) that will be produced by the lexical analyzer is ________. (answer in integer)
Answer: 13
Use maximal munch (take the longest possible match at each point). Split the string at whitespace and look at each group:
The total number of tokens .
Answer: 13
The total number of tokens .
Answer: 13