250+ TOP MCQs on World Wide Web and Answers

Computer Networks Multiple Choice Questions on “World Wide Web”.

1. A piece of icon or image on a web page associated with another webpage is called ______
a) url
b) hyperlink
c) plugin
d) extension

Answer: b
Clarification: URLs are locators for resources present on the World Wide Web. A plugin provides extra functionality to the webpage. An extension provides modification allowance for the core functionality of a webpage. Hyperlink is piece of icon or image on a web page associated with another webpage.

2. Dynamic web page ______
a) is same every time whenever it displays
b) generates on demand by a program or a request from browser
c) both is same every time whenever it displays and generates on demand by a program or a request from browser
d) is different always in a predefined order

Answer: b
Clarification: A dynamic web page provides different content every time the user opens it based on some events like new additions or time of the day. Languages such as JavaScript are used to respond to client-side events while languages such as PHP as used to respond to server-side events.

3. What is a web browser?
a) a program that can display a web page
b) a program used to view html documents
c) it enables user to access the resources of internet
d) all of the mentioned

Answer: d
Clarification: A web browser is an application program that is used to access the World Wide Web resources, applications and websites. Some examples of web browsers are Google Chrome, Internet Explorer and Safari.

4. Common gateway interface is used to _______
a) generate executable files from web content by web server
b) generate web pages
c) stream videos
d) download media files

Answer: a
Clarification: CGI is an interface through servers can run execute console-based executable files on a web server that generates dynamic web pages. A CGI script executes only when a request is made. The script then generates HTML.

5. URL stands for ________
a) unique reference label
b) uniform reference label
c) uniform resource locator
d) unique resource locator

Answer: c
Clarification: The Uniform Resource Locator is a locator for the resource to be located by HTTP on the World Wide Web. The URL is derived from the Uniform Resource Identifier.

6. A web cookie is a small piece of data that is _______
a) sent from a website and stored in user’s web browser while a user is browsing a website
b) sent from user and stored in the server while a user is browsing a website
c) sent from root server to all servers
d) sent from the root server to other root servers

Answer: a
Clarification: A web cookie is a small piece of data sent from a website and stored in user’s web browser while a user is browsing the website and is used to remember stateful information about the user’s operations on the website. This can help the website provide a better browsing experience to the user.

7. Which one of the following is not used to generate dynamic web pages?
a) PHP
b) ASP.NET
c) JSP
d) CSS

Answer: d
Clarification: CSS alone cannot be used to generate dynamic web pages as it does not provide many event handling functions. It can be used along with JavaScript to generate dynamic web pages which are visually compelling.

8. An alternative to JavaScript on windows platform is _______
a) VBScript
b) ASP.NET
c) JSP
d) PHP

Answer: a
Clarification: VBScript is a general-purpose, lightweight and active scripting language which can be used on Microsoft Visual Basic. It was first released in 1996.

9. What is document object model (DOM)?
a) convention for representing and interacting with objects in html documents
b) application programming interface
c) hierarchy of objects in ASP.NET
d) scripting language

Answer: a
Clarification: DOM is a hierarchical model i.e. a tree used to represent an HTML or XML document. Every node of the tree an object that represents a part of the document.

10. AJAX stands for _______
a) asynchronous javascript and xml
b) advanced JSP and xml
c) asynchronous JSP and xml
d) advanced javascript and xml

Answer: a
Clarification: AJAX is a group of technologies that works on the client-side to create asynchronous web applications. It is used to modify only a part of a webpage and not the whole webpage whenever some event occurs.

250+ TOP MCQs on Socket Programming and Answers

Computer Networks Assessment Questions and Answers on “Socket Programming”.

1. Which methods are commonly used in Server Socket class?
a) Public Output Stream get Output Stream ()
b) Public Socket accept ()
c) Public synchronized void close ()
d) Public void connect ()

Answer: b
Clarification: The Public socket accept () method is used by the ServerSocket class to accept the connection request of exactly one client at a time. The client requests by initializing the socket object with the servers IP address.

2. Which constructor of Datagram Socket class is used to create a datagram socket and binds it with the given Port Number?
a) Datagram Socket(int port)
b) Datagram Socket(int port, Int Address address)
c) Datagram Socket()
d) Datagram Socket(int address)

Answer: b
Clarification: Datagram Socket (int port, Int Address address) is used to create a datagram socket. A datagram socket is created for connection-less communication between the server and the client. There is no accept() method in this class.

3. The client in socket programming must know which information?
a) IP address of Server
b) Port number
c) Both IP address of Server & Port number
d) Only its own IP address

Answer: c
Clarification: The client in socket programming must know IP address of Server as it has to use that IP address in order to initialize the socket class constructor. That is how the client requests a connection to the server.

4. The URL Connection class can be used to read and write data to the specified resource that is referred by the URL.
a) True
b) False

Answer: a
Clarification: The URL Connection class can be used to read and write data to the specified resource referred by the URL. A connection to the URL is initialized by the OpenConnection() method of the class.

5. Datagram is basically just a piece of information but there is no guarantee of its content, arrival or arrival time.
a) True
b) False

Answer: a
Clarification: Datagram is basically some information travelling between the sender and the receiver, but there is no guarantee of its content, arrival or arrival time. A Datagram socket class object is created to make a datagram connection between the server and the client.

6. TCP, FTP, Telnet, SMTP, POP etc. are examples of ___________
a) Socket
b) IP Address
c) Protocol
d) MAC Address

Answer: c
Clarification: TCP, FTP, Telnet, SMTP, POP etc. are examples of Protocol. Out of them, TCP is a transport layer protocol and FTP, TELNET, SMTP and POP are application layer protocols.

7. What does the java.net.InetAddress class represent?
a) Socket
b) IP Address
c) Protocol
d) MAC Address

Answer: b
Clarification: The java.net.InetAddress class represents IP Address of a particular specified host. It can be used to resolve the host name from the IP address or the IP address from the host name.

8. The flush () method of Print Stream class flushes any un-cleared buffers in the memory.
a) True
b) False

Answer: a
Clarification: The flush () method of Print Stream class flushes any un cleared buffers in memory.

9. Which classes are used for connection-less socket programming?
a) Datagram Socket
b) Datagram Packet
c) Both Datagram Socket & Datagram Packet
d) Server Socket

Answer: c
Clarification: Datagram is basically some information travelling between the sender and the receiver, but there is no guarantee of its content, arrival or arrival time. Datagram Socket, Datagram Packet are used for connection-less socket programming, while Server Socket is used for connection-oriented socket programming.

10. In Inet Address class, which method returns the host name of the IP Address?
a) Public String get Hostname()
b) Public String getHostAddress()
c) Public static InetAddress get Localhost()
d) Public getByName()

Answer: a
Clarification: In Inet Address class public String getHostname() method returns the host name of the IP Address. The getHostAddress() method returns the IP address of the given host name.

250+ TOP MCQs on Topology and Answers

Computer Networks Multiple Choice Questions on “Topology”.

1. Physical or logical arrangement of network is __________
a) Topology
b) Routing
c) Networking
d) Control

Answer: a
Clarification: Topology in networks is the structure or pattern in which each and every node in the network is connected. There are many topologies in networking like bus, tree, ring, star, mesh, and hybrid topology. There is no particular best topology and a suitable topology can be chosen based on the kind of application of the network .

2. Which network topology requires a central controller or hub?
a) Star
b) Mesh
c) Ring
d) Bus

Answer: a
Clarification: In star topology, no computer is connected to another computer directly but all the computers are connected to a central hub. Every message sent from a source computer goes through the hub and the hub then forwards the message only to the intended destination computer.

3. _______ topology requires a multipoint connection.
a) Star
b) Mesh
c) Ring
d) Bus

Answer: d
Clarification: In bus topology, there is a single cable to which all the network nodes are connected. So whenever a node tries to send a message or data to other nodes, this data passes through all other nodes in the network through the cable. It is really simple to install but it’s not secure enough to be used in most of the computer network applications.

4. Data communication system spanning states, countries, or the whole world is ________
a) LAN
b) WAN
c) MAN
d) PAN

Answer: b
Clarification: WAN is the abbreviation for Wide Area Network. This network extends over a large geographical area. WANs are used to connect cities, states or even countries. A wireless connection is required to build a WAN. The best example of WAN is the Internet.

5. Data communication system within a building or campus is________
a) LAN
b) WAN
c) MAN
d) PAN

Answer: a
Clarification: LAN is an abbreviation for Local Area Network. This network interconnects computers in a small area such as schools, offices, residence etc. It is the most versatile kind of data communication system where most of the computer network concepts can be visibly used.

6. WAN stands for __________
a) World area network
b) Wide area network
c) Web area network
d) Web access network

Answer: b
Clarification: WAN is the abbreviation for Wide Area Network. This network extends over a large geographical area. These are used to connect cities, states or even countries. They can be connected through leased lines or satellites.

7. In TDM, slots are further divided into __________
a) Seconds
b) Frames
c) Packets
d) Bits

Answer: b
Clarification: TDM is the abbreviation for Time division multiplexing. It is technique for combining several low rate channels to a single high rate channel. For a certain time slot, the several channels could use the maximum bandwidth. Each channel is inactive for a period of time too. Some other multiplexing techniques are Frequency division multiplexing and Phase division multiplexing.

8. _____ is the multiplexing technique that shifts each signal to a different carrier frequency.
a) FDM
b) TDM
c) Both FDM & TDM
d) PDM

Answer: a
Clarification: FDM is an abbreviation for Frequency Division Multiplexing. This technique is used when the bandwidth of the channel is greater than the combined bandwidth of all the signals which are to be transmitted. The channel is active at all times unless a collision occurs with another channel trying to use the same frequency. Some other multiplexing techniques are Time division multiplexing and Phase division multiplexing.

250+ TOP MCQs on DHCP and Answers Online Quiz Exam

Computer Networks Multiple Choice Questions on “DHCP”.

1. What is the purpose of the DHCP server?
A. to provide storage for email
B. to translate URLs to IP addresses
C. to translate IPv4 addresses to MAC addresses
D. to provide an IP configuration information to hosts
Answer: D

2. How is the message sent from a PC2 when is first powers on and attempts to contact the DHCP Server?
A. Layer 3 unicast
B. Layer 3 broadcast
C. Layer 3 multicast
D. Without any Layer 3 encapsulation
Answer: B

3. What is the default behavior of R1 when PC1 requests service from DHCP server?
A. Drop the request
B. Broadcast the request to R2 and R3
C. Forward the request to R2
D. Broadcast the request to R2, R3 and ISP
Answer: A

4. Refer to the exhibit. Which rule does the DHCP server use when there is an IP address conflict?
A. The address is removed from the pool until the conflict is resolved.
B. The address remains in the pool until the conflict is resolved.
C. Only the IP detected by Gratuitous ARP is removed from the pool.
D. Only the IP detected by Ping is removed from the pool.
E. The IP will be shown, even after the conflict is resolved.
Answer: A

5. How does a DHCP server dynamically assign IP address to host?
A. Addresses are allocated after a negotiation between the server and the host to determine the length of the agreement.
B. Addresses are assigned for a fixed period of time. At the end of period, a new quest for an address must be made, and another address is then assigned.
C. Addresses are leased to host. A host will usually keep the same address by periodically contacting the DHCP sever to renew the lease.
D. Addresses are permanently assigned so that the host uses the same address at all times.
Answer: C

6. Which two tasks does the Dynamic Host Configuration Protocol perform? (Choose two)
A. Set the IP gateway to be used by the network.
B. Perform host discovery used DHCPDISCOVER message.
C. Configure IP address parameters from DHCP server to a host.
D. Provide an easy management of layer 3 devices.
E. Monitor IP performance using the DHCP server.
F. Assign and renew IP address from the default pool.
Answer: CF

7. Which statement is correct regarding the operation of DHCP?
A. A DHCP client uses a ping to detect address conflicts.
B. A DHCP server uses a gratuitous ARP to detect DHCP clients.
C. A DHCP client uses a gratuitous ARP to detect a DHCP server.
D. If an address conflict is detected, the address is removed from the pool and an administrator must resolve the conflict.
E. If an address conflict is detected, the address is removed from the pool for an amount of time configurable by the administrator.
F. If an address conflict is detected, the address is removed from the pool and will not be reused until the server is rebooted.
Answer: D

8. Which statements are true about the DHCP quarantine method? (Select two.)
A. The DNS server for a quarantine subnet is assigned by the enterprise DHCP server.
B. A quarantine subnet consists of a set of IP addresses dynamically assigned to endpoints.
C. Endpoint Integrity can be managed for endpoints with static IP addresses by defining exceptions.
D. A non-quarantine IP address is assigned by the NAC 800 after an endpoint passes integrity testing.
E. Port 2 of the NAC 800 can be connected to a switch that provides a path to multiple DHCP servers.
Answer: BE

9. A ProCurve 3500yl switch is connected to port 1 of a ProCurve NAC 800 and a DHCP server is connected to port 2. The DHCP server IP address is 10.1.10.10/24. The NAC 800 IP address is 10.1.10.20/24. The IP address 10.1.24.1/24 is assigned to VLAN 24 on the switch.
Which additional configuration settings would be appropriate for supporting a 10.1.24.0/24 non-quarantine subnet and a 10.1.25.0/24 quarantine subnet? (Select two.)
A. on the switch, a multinetted IP address of 10.1.25.1/24 assigned to VLAN 24
B. on the NAC 800, the IP address of the DHCP server specified as 10.1.10.10/24
C. on the NAC 800, IP addresses 10.1.24.51 through 10.1.24.100 defined as exceptions
D. on the switch, the IP helper addresses 10.1.10.10 and 10.1.10.20 defined for VLAN 24
E. on the DHCP server, one scope for 10.1.24.0/24 and a second scope for 10.1.25.0/24
Answer: AD

10. Which configuration task is applicable to the ProCurve NAC 800 inline quarantine method?
A. Enable the internal firewall.
B. Specify one or more quarantine subnets.
C. Add IP address entries to the Accessible Services List.
D. Select the port to be used for connection to the external network.
E. Identify the static and DHCP IP address ranges of endpoints to monitor.
Answer: C

11. What is an important factor to consider when deploying the ProCurve NAC 800 using the DHCP quarantine method?
A. The IP address lease duration must be set to five minutes or less on the DHCP server.
B. The DHCP server requires one additional, non-overlapping scope for every existing DHCP scope.
C. A switch must support traffic mirroring for each DHCP server protected by the NAC 800.
D. Endpoint Integrity cannot be enforced for devices using static IP addresses.
E. The DNS server scope option on the DHCP server must be set to the IP address of the NAC 800.
Answer: D

12. A network is configured to support a ProCurve NAC 800 operating with the DHCP quarantine method. How does an endpoint transition from a quarantine IP address to a non-quarantine IP address after passing integrity testing?
A. The NAC 800 triggers the switch to re-authenticate the endpoint causing a new DHCP request to be issued.
B. The NAC 800 sends a DHCP release to the endpoint followed by a DHCP assignment message with the IP address.
C. The switch stops forwarding DHCP requests from the endpoint to the NAC 800 and instead sends them to the DHCP server.
D. Any subsequent DHCP request from the endpoint is allowed by the NAC 800 to pass to the DHCP server.
Answer: D

13. A network is configured to support a ProCurve NAC 800 operating with the DHCP quarantine method. The NAC 800 is located between a ProCurve 3500yl switch and a DHCP server. How is DHCP traffic processed when an endpoint, that is currently unknown to the NAC 800, sends a DHCP request for an IP address?
A. The switch requests the endpoint’s integrity state from the NAC 800 before forwarding to the DHCP server.
B. If the NAC 800 receives a DHCP request addressed to the DHCP server, the request is blocked by the NAC 800.
C. The DHCP server checks the endpoint’s integrity state passed to it by the NAC 800 before responding with an IP address.
D. The DHCP server responds with a quarantine IP address initially and waits for the NAC 800 to indicate the endpoint has passed integrity testing.
Answer: B

14. A ProCurve 5406zl switch is connected to port 1 of a ProCurve NAC 800 and a DHCP server is connected to port 2 of the NAC 800. You are planning to deploy the ProCurve NAC 800 with the DHCP quarantine method using a shared subnet approach. Which configuration requirement must be satisfied?
A. The quarantine and non-quarantine subnets defined on the NAC 800 must be the same.
B. The switch requires that separate VLANs be defined for the quarantine and non-quarantine subnets.
C. Each switch VLAN supporting the endpoints must use a single IP helper set to the IP address of the NAC 800.
D. The scope on the DHCP server and the quarantine subnet on the NAC 800 must use non-overlapping IP addresses.
Answer: D

15. You are configuring a ProCurve NAC 800 to operate using the DHCP quarantine method. Which parameters are specified when adding a quarantine area? (Select three.)
A. IP address of the DHCP server
B. IP address of a RADIUS server
C. IP address of a default gateway
D. range of quarantine IP addresses
E. lease duration time for IP addresses
F. non-quarantine subnet using CIDR notation
G. IP address of a DNS server for quarantine subnet
H. static route for endpoints to use when quarantined
Answer: CDF

16. _____ Sets an alias for a host name
A. DNS Event Logging tab
B. DNS Debug Logging tab
C. DNS CNAME (canonical name)
Answer: C

17. 10.0.0.0 255.0.0.0 (Assignable IP range – 10.0.0.1-10.255.255.254) is
A. Class C
B. Class D
C. Class A
D. Class B
Answer: C

18. _______ : Declares the host that’s the most authoritative for the zone and, as such, is the best source of DNS information for the zone.
A. DNS PTR Record
B. DNS Start of Authority
C. DNS Monitoring tab
D. DNS A Record
Answer: B

19. which is the type of DNS Scopes
A. Normal DHCP Scope
B. Normal, Multicast, Super
C. Multicast Scope
D. Forward Lookup Zone
Answer: B

20. _____. Is the process of placing timestamps on dynamically registered records
A. Aging
B. IP
C. AIPAA
D. TCP
Answer: A

21. which IP range is 69.254.0.1 to 169.254.255.254 / 255.255.0.0
A. Aging
B. TCP
C. AIPAA
Answer: C

22. _________ indicates that the DHCP server is authorized and active
A. DHCP Server Migration
B. DHCP white circle with green up arrow
C. DHCP white circle with red down arrow
D. DHCP red circle with X
Answer: B

23. _______ DNS tab to perform basic tests of name resolution
A. DNS PTR Record
B. DNS Monitoring tab
C. DNS Debug Logging tab
D. DNS A Record
Answer: B

24. Connection Oriented Protocol for end-to-end communication is called
A. Aging
B. CORRECT: TCP
C. IP
D. None of the above
Ans: B

25. DHCP audit logs are stored in ________
A. Multicast Scope
B. DNS PTR Record
C. Super Scope
D. %systemroot%\system32\dchp
Answer: D

26. DHCP ____ _______ occur every 60 minutes
A. Multicast Scope
B. Super Scope
C. Subnet Mask
D. Automatic Backups
Answer: D

27. DHCP servers dynamically update ____________ on behalf of clients using secure updates
A. DNS A Record
B. Automatic Backups
C. DNS PTR Record
D. A & PTR Records
Answer: D

28. ________ DNS tab for detailed troubleshooting
A. DNS PTR Record
B. Scavenging
C. DNS Event Logging tab
D. DNS Debug Logging tab
Answer: D

29. ______ interval is the period after the no-refresh interval during which the timestamp can be refreshed.
A. Refresh Interval
B. Class A
C. No-refresh Interval
D. DNS A Record
Answer: A

30. ______ interval is the period after the timestamp is set that must elapse before refresh can occur.
A. Nonsecure Method
B. Refresh Interval
C. Forwarder
D. No-refresh Interval
Answer: D

31. _____ – on server, server is not authrozied in Active Directory
A. DHCP white circle with green up arrow
B. DHCP white circle with red down arrow
C. DHCP red circle with X
D. DHCP Server Migration
Answer: B

32. internetworking protocol for routing packets over a network is called_________.
A. IP
B. AIPAA
C. TCP
D. Aging
Answer: A

33. ____________ scope is needed for Assigning Class A, B, C IP addresses and related network settings
A. Multicast Scope
B. Forward Lookup Zone
C. Super Scope
D. Normal DHCP Scope
Answer: D

34. ______ Maps an IP address to a host name for reverse lookups
A. DNS A Record
B. A & PTR Records
C. Super Scope
D. DNS PTR Record
Answer: D

35. Dynamic DNS clients register their A records using a ______ method
A. DNS PTR Record
B. Scavenging
C. DNS A Record
D. Nonsecure Method
Answer: D

36. _____ is used to determine the IP address of a computer from its FQDN
A. Forward Lookup Zone
B. Forwarder
C. Reverse Lookup Zone
D. Normal DHCP Scope
Answer: A

37. Name server designated as the recipient of forwarded queries is known as _______
A. Class B
B. Class C
C. Forwarder
D. None of the above
Answer: C

38. what is %systemroot%\System32\DHCP
A. DHCP Server Migration
B. DHCP red circle with X
C. DHCP Lease 4 part process
D. DHCP Database location
Answer: D

39. _______ is used for assigning Class D IP addresses and related network settings
A. Normal DHCP Scope
B. Super Scope
C. Class C
D. Multicast Scope
Answer: D

40. Every DHCP server must have at least one active scope to grant leases to clients
A. True
B. False
Answer: A

41. which Displays entries in DNS cache
A. ipconfig /displaydns
B. ipconfig /flushdns
C. Normal DHCP Scope
D. ipconfig /registerdns
Answer: A

42. _____is the process of deleting outdated (stale) resource records.
A. Class A
B. False
C. Scavenging
D. Aging
Answer: C

43. _________Refreshes leased IP addresses and re-registers DNS
A. ipconfig /flushdns
B. ipconfig /registerdns
C. DNS A Record
D. ipconfig /displaydns
Answer: B

44. _____ is used to determine a computer’s FQDN from it’s IP address
A. Forward Lookup Zone
B. Normal DHCP Scope
C. Super Scope
D. Reverse Lookup Zone
Answer: D

45. _______ is used as containers for scopes
A. Super Scope
B. DNS PTR Record
C. Multicast Scope
D. Subnet Mask
Answer: A

46. _____ Maps a host name to an IP address.
A. DNS A Record
B. Forwarder
C. Super Scope
D. DNS PTR Record
Answer: A

47. which Identifies with parts of the IP adddress belong to the network ID and which parts belong to the host ID.
A. Class A
B. Subnet Mask
C. Super Scope
D. Scavenging
Answer: B

48. what is DHCP 044?
A. DHCP options for IPv6
B. DHCP options DNS Servers
C. DHCP options WINS node type
D. DHCP options WINS Servers
Answer: D

49. what is DHCP 003?
A. DHCP options
B. DHCP options for IPv6
C. DHCP options DNS Servers
D. DHCP options Router
Answer: D

50. ___________netsh dhcp server scope 192.168.1.0 add exclude range 192.168.1.1 192.168.1.25
A. Server core, create DHCP reservations
B. Server core, create DHCP exclusions
C. Server core start the DHCP service.
D. Server core, create DHCP scope.
Answer: B

250+ TOP MCQs on IPv4 and Answers

Computer Networks Multiple Choice Questions on “IPv4”.

1. Which of the following is not applicable for IP?
a) Error reporting
b) Handle addressing conventions
c) Datagram format
d) Packet handling conventions

Answer: a
Clarification: The Internet Protocol is the networking protocol which establishes the internet by relaying datagrams across network boundaries. ICMP is a supporting protocol for IP which handles the Error Reporting functionality.

2. Which of the following field in IPv4 datagram is not related to fragmentation?
a) Flags
b) Offset
c) TOS
d) Identifier

Answer: c
Clarification: TOS-type of service identifies the type of packets. It is not related to fragmentation but is used to request specific treatment such as high throughput, high reliability or low latency for the IP packet depending upon the type of service it belongs to.

3. The TTL field has value 10. How many routers (max) can process this datagram?
a) 11
b) 5
c) 10
d) 1

Answer: c
Clarification: TTL stands for Time to Live. This field specifies the life of the IP packet based on the number of hops it makes (Number of routers it goes through). TTL field is decremented by one each time the datagram is processed by a router. When the value is 0, the packet is automatically destroyed.

4. If the value in protocol field is 17, the transport layer protocol used is _____________
a) TCP
b) UDP
c) ICMP
d) IGMP

Answer: b
Clarification: The protocol field enables the demultiplexing feature so that the IP protocol can be used to carry payloads of more than one protocol type. Its most used values are 17 and 6 for UDP and TCP respectively. ICMP and IGMP are network layer protocols.

5. The data field cannot carry which of the following?
a) TCP segment
b) UDP segment
c) ICMP messages
d) SMTP messages

Answer: c
Clarification: Data field usually has transport layer segments, but it can also carry ICMP messages. SMTP is an application layer protocol. First it must go through the transport layer to be converted into TCP segments and then it can be inserted into IP packets.

6. What should be the flag value to indicate the last fragment?
a) 0
b) 1
c) TTl value
d) Protocol field value

Answer: a
Clarification: The Flag field in the IP header is used to control and identify the fragments. It contains three bits: reserved, don’t fragment and more fragments. If the more fragments bit is 0, it means that the fragment is the last fragment.

7. Which of these is not applicable for IP protocol?
a) is connectionless
b) offer reliable service
c) offer unreliable service
d) does not offer error reporting

Answer: b
Clarification: IP does not provide reliable delivery service for the data. It’s dependent upon the transport layer protocols like TCP to offer reliability.

8. Which of the following demerits does Fragmentation have?
a) complicates routers
b) open to DOS attack
c) overlapping of fragments.
d) all of the mentioned

Answer: d
Clarification: Fragmentation makes the implementation of the IP protocol complex and can also be exploited by attackers to create a DOS attack such as a teardrop attack. Fragmentation won’t be required if the transport layer protocols perform wise segmentation.

9. Which field helps to check rearrangement of the fragments?
a) offset
b) flag
c) ttl
d) identifer

Answer: a
Clarification: The Fragment Offset field specifies where the fragment fits in the original datagram. The offset of the first fragment will always be 0. The size of the field (13 bits) is 3-bits shorter than the size of the total length field (16 bits).

250+ TOP MCQs on Cookies and Answers

Computer Networks Multiple Choice Questions on “Cookies”.

1. Cookies were originally designed for ____________
a) Client side programming
b) Server side programming
c) Both Client side programming and Server side programming
d) Socket programming

Answer: b
Clarification: Cookies were originally designed for server side programming, and at the lowest level, they are implemented as an extension to the HTTP protocol. They were introduced with the intention of providing a better user experience for the websites.

2. The Cookie manipulation is done using which property?
a) cookie
b) cookies
c) manipulate
d) manipulate cookie

Answer: a
Clarification: The cookie property sets or returns all name/value pairs of cookies in the current document. There are no methods involved: cookies are queried, set, and deleted by reading and writing the cookie property of the Document object using specially formatted strings.

3. Which of the following explains Cookies nature?
a) Non Volatile
b) Volatile
c) Intransient
d) Transient

Answer: d
Clarification: Cookies are transient by default; the values they store last for the duration of the web browser session but are lost when the user exits the browser. While the browsing session is active the cookie stores the user values in the user’s storage itself and accesses them.

4. Which attribute is used to extend the lifetime of a cookie?
a) Higher-age
b) Increase-age
c) Max-age
d) Lifetime

Answer: c
Clarification: If you want a cookie to last beyond a single browsing session, you must tell the browser how long (in seconds) you would like it to retain the cookie by specifying a max-age attribute. A number of seconds until the cookie expires. A zero or negative number will kill the cookie immediately.

5. Which of the following defines the Cookie visibility?
a) Document Path
b) LocalStorage
c) SessionStorage
d) All of the mentioned

Answer: d
Clarification: sessionStorage, localStorage and Document path all are used to store data on the client-side. Each one has its own storage and expiration limit. Cookie visibility is scoped by the document origin as Local Storage and Session Storage are, and also by document path.

6. Which of the following can be used to configure the scope of the Cookie visibility?
a) Path
b) Domain
c) Both Path and Domain
d) Server

Answer: d
Clarification: The Cookie visibility scope is configurable through cookie attributes path and domain. Domain attribute in the cookie is used to specify the domain for which the cookie is sent. Path includes the Path attribute in the cookie to specify the path for which this cookie is sent.

7. How can you set a Cookie visibility scope to local Storage?
a) /
b) %
c) *
d) #

Answer: a
Clarification: Setting the path of a cookie to “/” gives scoping like that of localStorage and also specifies that the browser must transmit the cookie name and value to the server whenever it requests any web page on the site.

8. Which of the following is a Boolean cookie attribute?
a) Bool
b) Secure
c) Lookup
d) Domain

Answer: b
Clarification: The final cookie attribute is a boolean attribute named secure that specifies how cookie values are transmitted over the network. By default, cookies are insecure, which means that they are transmitted over a normal, insecure HTTP connection. If a cookie is marked secure, however, it is transmitted only when the browser and server are connected via HTTPS or another secure protocol.

9. Which of the following function is used as a consequence of not including semicolons, Commas or whitespace in the Cookie value?
a) EncodeURIComponent()
b) EncodeURI()
c) EncodeComponent()
d) Encode()

Answer: a
Clarification: Cookie values cannot include semicolons, commas, or whitespace. For this reason, you may want to use the core JavaScript global function encodeURIComponent() to encode the value before storing it in the cookie.

10. What is the constraint on the data per cookie?
a) 2 KB
b) 1 KB
c) 4 KB
d) 3 KB

Answer: c
Clarification: Each cookie can hold up to only 4 KB. In practice, browsers allow many more than 300 cookies total, but the 4 KB size limit may still be enforced by some. Storage of a session has to be a minimum of 5MB.