GATE 2024 (Session 1)
65 questions
MCQ 29 · MSQ 20 · NAT 161-mark 30 · 2-mark 35
Questions 31–35 of 65
Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?
One or more options are correct.
Answer: (A), (C)
When a packet goes out, NAT swaps the private source IP (and the port) for its own public IP.
One header field has changed, so the header checksum has to be calculated again.
The destination IP stays the same, because it is the outside server. The total length also stays the same, because the payload size has not changed.
Answer: Source IP, Header Checksum
One header field has changed, so the header checksum has to be calculated again.
The destination IP stays the same, because it is the outside server. The total length also stays the same, because the payload size has not changed.
Answer: Source IP, Header Checksum
Let and be non-empty finite sets such that there exist one-to-one and onto functions (i) from to and (ii) from to . The number of possible values of is ___
Answer: 2
A bijection gives .
A bijection gives .
We also have , so .
- : , True
- : take A and B disjoint, True
So .
Answer: 2
A bijection gives .
We also have , so .
- : , True
- : take A and B disjoint, True
So .
Answer: 2
Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table below.
The value of the expression as per the above rules is _____
The value of the expression as per the above rules is _____
Answer: 6
Order of precedence: + is highest, then * / is lowest. The operator with the lowest precedence is done last, so / splits the expression into parts:
First part: + is done before *, so .
Second part: Do + first: . Then the operator is right associative, so: .
The operator / is also right associative: .
Answer: 6
First part: + is done before *, so .
Second part: Do + first: . Then the operator is right associative, so: .
The operator / is also right associative: .
Answer: 6
The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is _________
Answer: 16
A complete graph has a number of spanning trees given by Cayley's formula: .
Put n = 4 here:
Answer: 16
Put n = 4 here:
Answer: 16
Consider the following two relations, and :
The total number of tuples obtained by evaluating the following expression is ____
The total number of tuples obtained by evaluating the following expression is ____
Answer: 2
Join the tables where holds:
- A = 10: (10, 20, 90) so the condition is True
- A = 30: (30, 40, 45) so the condition is True
- A = 30: (30, 50, 45) so the condition is False
(A = 20 and A = 50 in R, and A = 40 in S, have no matching tuple.)
Answer: 2
- A = 10: (10, 20, 90) so the condition is True
- A = 30: (30, 40, 45) so the condition is True
- A = 30: (30, 50, 45) so the condition is False
(A = 20 and A = 50 in R, and A = 40 in S, have no matching tuple.)
Answer: 2