# GATE Solved Paper 2017-19 - GATE 2017 Shift 2

>>>>>>>>GATE 2017 Shift 2

• Option : A
• Explanation :
Clearly 13 = 1 x 10 + 3 and 36 = 3 x 10 + 6 ⇒ base b = 10
The quadratic equation with solutions x = 5 and x = 6 is x2 - 11x + 30 = 0
According to the given condition, we have b + 3 = 11 and 3b + 6 = 30 ⇒ b = 8
Alternative solution:
x2 - 13x + 36 = 0 (given quadratic equation)
In bae b, 13 = 1xb1 + 3xb0 = b+3 and
36 = 3x1 + 6x0 = 3b + 6
So the equation becomes x2 - (b + 3)x + (3b + 6) = 0
Since x = 5 is a solution
∴ 52 - (b + 3)5 + (3b + 6) = 0 ⇒ b = 8
Similarly, by putting x = 6, we get b = 8

• Option : C
• Explanation :
The given grammar with S as start symbol is
S → XY
X → aX∣a
Y → aYb∣ϵ
X generates atleast one 'a'. While Y generates equal no of a's and b's( including epsilon).
L = { a , ab, aab, aabb, aaabb ....}

• Option : D
• Explanation :
(BCA9)16 = (001 011 110 010 101 001)2 = (136251)8
Convert hexadecimal to the octal number system.

• Option : C
• Explanation :
void printxy (int x, int y) {
int *ptr;
x = 0; // x=0,y=1
ptr = &x; // x=0,y=1, and ptr points to x
y = * ptr; //x=0, y=0
* ptr = 1; //x=1, y=0
printf (“%d, %d,” x, y); // It prints 1 AND 0.
}

• Option : B
• Explanation :
Record Route is an optional field used to record address.
In IPv4 header, 40 bytes are reserved for OPTIONS. For Record Route to stores, 1 byte is used to store type of option, 1 byte for length and 1 byte for pointer. Out of 40, 37 bytes are left.
An IP4 address takes 32 bits or 4 bytes.
We can store at most floor(37/4) = 9 router addresses.
Alternate Solution
In IPV4 frame format there are 40 bytes of option field, out of which only 38 bytes can be used, 2 bytes are reserved. Also one IPV4 address is of 4 bytes
Thus maximum IPV4 address that can be hold <= 38/4 = 9
Related Quiz.
GATE 2017 Shift 2