Docsity

Practice Exam - Network Programming | CS 228, Exams of Computer Science

Toggle sidebar
bg1
HTTP
1) Which of these response codes represent error conditions? (Circle all that apply)
a. 100’s
b. 200’s
c. 300’s
d. 400’s
e. 500’s
2) What is the purpose of the Etag feature of HTTP/1.1
3) I want seven pages all from the same server. Which version of HTTP sends the
least packets?
a. HTTP/0.9
b. HTTP/1.0
c. HTTP/1.1
d. HTTP/1.2
e. They are all the same
f. It depends on external factors. For example _______________________
4) What advantage does HTTP/1.1 have over HTTP/1.0 when you only want one
page from a given site?
TCP
1) Which flags are set on the first packet sent from the server to the client (be
careful! circle all that are set)?
a. SYN
b. ACK
c. FIN
d. Mongol
2) What is the relationship between the client’s sequence number and the server’s
sequence number?
3) Why does the client choose a random different sequence number each time?
ROUTING
1) On the real internet, if you want to send a packet to Australia or Zambia or
Afghanistan, how many hops are likely between you and that place?
pf3

Partial preview of the text

Download Practice Exam - Network Programming | CS 228 and more Exams Computer Science in PDF only on Docsity!

HTTP

  1. Which of these response codes represent error conditions? (Circle all that apply) a. 100’s b. 200’s c. 300’s d. 400’s e. 500’s
  2. What is the purpose of the Etag feature of HTTP/1.
  3. I want seven pages all from the same server. Which version of HTTP sends the least packets? a. HTTP/0. b. HTTP/1. c. HTTP/1. d. HTTP/1. e. They are all the same f. It depends on external factors. For example _______________________
  4. What advantage does HTTP/1.1 have over HTTP/1.0 when you only want one page from a given site? TCP
  5. Which flags are set on the first packet sent from the server to the client (be careful! circle all that are set)? a. SYN b. ACK c. FIN d. Mongol
  6. What is the relationship between the client’s sequence number and the server’s sequence number?
  7. Why does the client choose a random different sequence number each time? ROUTING
  8. On the real internet, if you want to send a packet to Australia or Zambia or Afghanistan, how many hops are likely between you and that place?

a. Between 1 and 5 b. Between 5 and 50 c. Between 50 an 500. d. Anything else

  1. Who routes the typical packet a. The sender b. The receiver c. The routers along the way d. Anything else
  2. Which algorithm does the real internet use? a. Ford b. Diffey-Helman c. Dijisktra d. Anything else
  3. (Gengis/Kubla) Who had a larger empire, Gengis Khan or Kubla Khan? SMTP
  4. (Success/Error) Is Response code 271 an indicator of success or error?
  5. When sending mail to [email protected] which server should I connect? a. yahoo.com b. www.yahoo.com c. Anything else
  6. (Yes/No) Can an SMTP server verify the real username of the sending person?
  7. (Yes/No) Can an SMTP server verify the real IP number of the sending computer? PROGRAMMING
  8. What does the write command return on success?
  9. What does this code print? if (fork() == 0) cout << “Chop Heads\n”; cout << “Cut Legs\n”;
  10. If Genghis Khan were to use a networking protocol, which would he prefer?
  11. There is code at /staff/randy/final.cc. It prints the first 50 words from a dictionary. Write me a program that checks to see if any of those words are also web sites. For example “abba” is in the dictionary. Tell if www.abba.com is a web site, tell me so. (three points)