PYTEST QUIZ DESCRIPTION

_____is the default port of SMTP.
 

  • 25

  • 70

  • 80

  • 85

______ are the advantages of hierarchical routing.

  • Flexibility
     

  •  Reliability
     

  •  Scalability
     

  • Portability

Which of the following net is the combination of two or more networks?

  • MAN
     

  •  WAN
     

  • Internetwork
     

  • None of these

Select the command is used to manipulate the TCP/IP routing table.

  • Ifconfig
     

  •  Ipconfig

  • route
     

  •  Traceroute

What protocol can be used to retrieve web pages using python?

  • urllib
     

  •  bs4
     

  • HTTP
     

  • GET

 

What does the following block of code do?

import urllib.request
fhand = urllib.request.urlopen('http://data.pr4e.org/romeo.txt')
for line in fhand:
    print(line.decode().strip())

 

  • It creates a file named 'romeo.txt' in 'data.pr4e.org'
     

  •  It finds the urls linked to 'data.pr4e.org' and prints it.
     

  •  It opens a file named 'http://data.pr4e.org/romeo.txt' in local storage
     

  •  It prints the contents of 'romeo.txt' after retrieving it from 'data.pr4e.org'
        

FTP is the  …?

  • File transmission protocol
     

  •  File transfer protocol
     

  •  Form transmission protocol
     

  •  Form transfer protocol

_______is the Machine that places the request to access the data

  • Client Machine
     

  •  Server Machine
     

  •  Request Machine
     

  •  None of these

What is a socket?

  • Programming that allows only local computers to communicate with each other
     

  • TCP connection between local computers only
     

  • Connection between computers, over UDP only
     

  •  Abstraction of ports

Which of the following function used to create window in python tkinter.

  • window()
     

  •  tk()
     

  •  toolkit()
     

  • wd()

 

What does the following block of code print?

url = "https://www.nytimes.com/"
html = urllib.request.urlopen(url).read()
soup = BeautifulSoup(html, 'html.parser')

tags = soup('img')
for tag in tags:
    print(tag.get('src', None))

  • retrieves and displays the webpage
     

  •  downloads the webpage
     

  •  prints the images from 'www.nytimes.com'
     

  • prints all the 'img' sources under 'src' from 'www.nytimes.com'

Sockets are different from ports because ?

  • They included IP addresses
     

  •  They are in the Application Layer
     

  •  They use the OSI model
     

  • They are just another term for the same thing

 one of the following classes are used for connection-less socket programming?

  • Datagram Socket
     

  • Datagram Packet
     

  • Both Datagram Socket
     

  •  Datagram Packet
     

What must be done before disconnecting a socket?

  • Ending the data stream

  • Telling the server good-bye

  • Flushing the cache

  • Nothing, you can simply "unplug" with no ill effects

______ Net Ware protocol provides link-state routing.

  • SAP

  • RIP

  • NLSP

  • NCP

What is the process by which search engines retrieve webpages and build a search index called?

  • scrape
     

  •  parse
     

  •  BeautifulSoup
     

  •  spider

Is it possible to set the title for a window after creating it?

  • yes
     

  • . no
     

  •  maybe yes
     

  •  maybe no

What does the following block of code do?

import urllib.request, urllib.parse, urllib.error
img = urllib.request.urlopen('http://data.pr4e.org/cover3.jpg').read()
fhand = open('cover3.jpg', 'wb')
fhand.write(img)
fhand.close()

  • It retrieves 'cover3.jpg' and saves it to your computer.
     

  • It displays the image 'cover3.jpg'.
     

  •  It retrieves the url to download 'cover3.jpg'
     

  •  It doesn't retrieves anything.

Choose from the following in which one forwarding, the mask, and destination addresses are both 0.0.0.0 in the routing table.

  • next-hop
     

  •  default
     

  • host-specific
     

  •  network-specific

__________are the types of firewalls.

  • Packet Filtering
     

  • Dual Homed Gateway
     

  •  Both A and B
     

  •  None of these

Which function is used to set the size of the tkinter window?
 

  • setsize()
     

  • . size()
     

  •  geometry()
     

  •  dimension()

 Select from the following which one in the routing algorithm can be used for network layer design.

  •  shortest path algorithm
     

  •  link-state routing
     

  •  distance vector routing
     

  •  all of the mentioned

One of the following is a path vector routing?

  • exterior gateway protocol
     

  •  inter-domain routing
     

  •  network routing protocol
     

  •  All of these

One of the following the java.net Net Address class represents.

  • Socket
     

  •  Protocol
     

  •  IP Address
     

  •  MAC Address

What provides two way communication between two different programs in a network.

  • socket
     

  •  port
     

  • . http
     

  • protocol

Select from the following in which forwarding, the complete IP address of a destination is provided in the routing table.

  • next-hop
     

  •  host-specific
     

  •  network-specific
     

  •  default

one of the following is a path vector routing?

  • exterior gateway protocol
     

  •  inter-domain routing
     

  • network routing protocol
     

  •  All of these

High speed connectivity providing through_______network.

  • LAN
     

  •  MAN
     

  •  WAN
     

  • All of these

FDDI stands for.

  • Fiber Distributed Data Interface
     

  • . Fiber Data Distributed Interface
     

  •  Fiber Dual Distributed Interface
     

  •  Fiber Distributed Data Interface

IP address 200.200.200.200 is IP of which class?

  • Class C
     

  • . Class D
     

  •  Class A
     

  • Class B