CS FundamentalsVery hardGATE CS (PYQ pattern)
A 3000-byte attachment is Base64-encoded for e-mail: every 3 bytes become 4 characters, and the encoded text is wrapped into lines of at most 76 characters, each line ending with CRLF (2 bytes). How many bytes does the encoded attachment occupy?
- A. 4000
- B. 4053
- C. 4106
- D. 4108
Correct answer: C. 4106
3000 bytes give 4000 characters; ceil(4000/76) = 53 lines; plus 53 x 2 = 106 bytes of CRLF: 4106 bytes.
More Computer Networks questions
- A customer receives 2001:db8:abcd::/48 and gives each of its sites a /56, numbering sites 0, 1, 2, ... in address order. Each site then…
- A router R has three interfaces. Interface 1 connects to a switch S1 whose four ports lead to R, hosts H1 and H2, and a hub with hosts H3…
- A TCP sender starts with cwnd = 1 MSS and ssthresh = 16 MSS and no loss ever occurs. Each round trip the window doubles while below…
- A Reno sender has cwnd = 20 MSS when three duplicate ACKs arrive (fast retransmit and fast recovery: ssthresh = cwnd/2, cwnd = ssthresh +…
- How many of these addresses are in the private ranges of RFC 1918 (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)? 10.255.1.1, 172.15.0.1…
- Network 200.1.1.0/24 is divided into /27 subnets. How many of these addresses are usable host addresses (neither a subnet's network…