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
Answer is 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
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 ....}
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.
}
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