June 10, 2018

Computer Networks - MCQS

Question
The following application layer protocol spec specifies support for both TCP and UDP at the transport layer:

a. DNS
b. FTP
c. Telnet
d. HTTP

The correct answer is: DNS

Question
The transport protocol on which SMTP runs is:

A. TCP
B. UDP
C. IP
D. None of the above

The correct answer is: TCP

Question
Which of the statements below does not apply to  Circuit Switched Networks?
a.  Can be implemented using Time Domain Multiplexing as well as  Frequency Domain Multiplexing
b. A call set up is required before the data can be sent from the source to the destination
c.  Dedicated resources used for transmission from source to destination
d.  Once a particular call has been set up between the source and destination,  data fragmented at the routers can be sent along different paths to the destination

The correct answer is:  Once a particular call has been set up between the source and destination,  data fragmented at the routers can be sent along different paths to the destination

Question
Among  the network topologies listed below, which  would be the preferred WAN design to implement for a company with  a hierarchical structure i.e. with main, regional and branch offices,  where information is exchanged  from main to regional to branch offices and vice-versa?a. Partial Mesh
b. Double-Ring
c. Tree
d. Ring

The correct answer is: Partial Mesh

Question
An organization’s LAN that connects the end systems of the users  to the edge router   is part of :
A. Network Edge Laye
B. Network Core Layer
C. Network Access  Layer
D. None

The correct answer is:     Network Access  Layer

Question
Applications that need to talk across a network uses __________ for communication with the end-node (destination)

a. Sockets
b. Semaphores 
c.  Message queues
d. Shared memory

The correct answer is: Sockets

Question
Which of the status codes  is returned as part of the HTTP Response if the requested content on the server is unchanged?

302
306
304
301

The correct answer is: 304

Question
Which one of the following statements is NOT  about HTTP cookies?
a. Cookies can be used to track the browsing pattern of a user at a particular site.
b. Cookies are a piece of code that has the potential to compromise the security of an Internet user.
c. Cookies get access to the client computer through an HTTP header.
d. Cookies have expiry time.

The correct answer is: Cookies are a piece of code that has the potential to compromise the security of an Internet user.

Question
DNS servers that give us access to DNS records to map the names of hosts to IP addresses are called:
A. TLD DNS servers
B. Authoritative DNS servers
C. Root DNS servers
D. Local DNS servers

a. C
b. B
c. D
d. A

The correct answer is: B

Question
What is the size of Urgent pointer in TCP segment

a. 24 bits
b. 8 bits
c.  32 bits
d.  16 bits

The correct answer is:  16 bits

Question
What is often needed for UDP functioning
a.  PPP and CHAP
b. DNS and SNMP
c.  Frame relay and X.25
d. SMTP and POP3

The correct answer is: DNS and SNMP

Question
Which of the following is/are example(s) of stateful application layer protocols?
(i)  HTTP
(ii) FTP
(iii) TCP
(iv) POP3
a. 1,3,4
b. 2,3
c. 1,2,3
d. 2,4

The correct answer is: 2,4

Question
Choose the right answer: DNS is used for:
i) Mail server aliasing
ii) Load distribution
iii) Host aliasing

a. i,iii
b. i,ii,iii
c. i,ii
d. iii,i

The correct answer is: i,ii,iii

Question
What is the major application of UDP

a.  Multimedia
b.  Scheduling
c.  Small office network
d.  LAN communication

The correct answer is:   Multimedia

Question
Error Control and Flow Control are responsibilities ofa.

a. data link and Physical Layer
b. data link and Transport Layer
c. data link and network Layers
d. Application and Presentation Layer

The correct answer isdata link and Transport Layer

Question
Which of the following statements regarding the Internet Structure is FALSE?
a.   Each Tier 2 or Regional ISP is a customer of  one or more Tier 1 ISPs
b.  A Tier 2 ISP cannot peer privately with one or more Tier-2 ISPs  
c.   A Tier 1 ISP  has a national or international coverage over a wide area, and has a network consisting of high end routers and  links with high bandwidth
d.   A Tier 3 or Local ISP may decide to be a direct customer of a  Tier 1 ISP

The correct answer is:  A Tier 2 ISP cannot peer privately with one or more Tier-2 ISPs 

Question
9.Which of the following applications uses peer-to-peer paradigm?
a.  FTP
b. Skype
c.  Email
d.  World-Wide-Web

The correct answer is: Skype

Question
Sequence the following actions for the interaction between a web browser and a web server.

A. Browser requests a webpage using HTTP.
B. Browser establishes a TCP connection with the web server.
C. Server sends the requested webpage using HTTP.
D. Browser resolves the domain name using DNS.
a. 4,2,1,3
b. 2,3,4,1
c. 1,3,2,4
d. 1,2,3,4

The correct answer is: 4,2,1,3

Question
Suppose within your web browser you click on a link to obtain a Web  page. The IP address of the associated URL is cached in your local host, so a DNS lookup is not necessary to obtain the IP address.  Suppose that the webpage associated with the link contains exactly one object consisting of a small amount  of  HTML text, which references 10 very small objects on the same server. Let  RTT' denote the  RTT between  the local host and the server containing the object. Assuming zero transmission time of the object. How much time is needed to get the to retrieve the web page fully, in the following cases:

a. Non-persistent HTTP with no parallel TCP connections?
b. Persistent HTTP?

a. 20RTT', 3RTT'
b. 22RTT', 2RTT'
c. 22RTT', 3RTT'
d. 20RTT', 2RTT'

The correct answer is: 22RTT', 3RTT'

Question
Which of the following statements is ?

a.  Queuing delay depends on the congestion of the router
b. A  greater length of physical link will always lead to an increased  transmission delay
c.  Greater the bandwidth of the physical link, lesser is the propagation delay
d.  If the bandwidth remains the same,  the transmission delay  increases with the size of the packet

The correct answer is: A  greater length of physical link will always lead to an increased  transmission delay

Question
Collaborative Web and Semantic Web are also referred   as:
a.  Web 1.0  and Web 2.0 respectively
b.  Web 2.0 and Web 3.0 respectively
c.   Both  Web 2.0
d.  Both  Web 3.0

The correct answer is:  Web 2.0 and Web 3.0 respectively

Question
The time difference between the  instant at which a transport connection is requested and the instant at which it is confirmed is called as ........

a. Transit delay
b. Connection establishment delay
c.  Protection delay
d. Priority delay

The correct answer is: Transit delay

Question
Which  of the following statements regarding network devices is ?

a. Hubs operate at the data link layer
b. Repeaters  operate  at the physical layer
c. Switches may operate both at the data link and the network layer 
d. Bridges operate at the data link layer

The correct answer is: Hubs operate at the data link layer

Question
Which of the statements below about HTTP is ?

a.  Cookies are used to maintain state at sender/receiver over multiple connections
b. Compared to using a persistent connection,   a non-persistent connection  leads to more round trips between the client and server
c.  HTTP is basically a stateless protocol where the Web server does not maintain information about past requests from a client
d. If HTTP Version 1.1  is used,  connections between client and server are non-persistent by default

The correct answer is: If HTTP Version 1.1  is used, connections between client and server are   non-persistent by default

Question
What is the size of the checksum field of UDP Checksum

a.  32 bits
b. 16 bits
c. 24 bits
d. 8 bits

The correct answer is: 16 bits

Question
Which of the methods mentioned below is not a valid Request Header?

a. Set-Cookie
b. Host
c. If-Modified-Since
d. Accept-Language

The correct answer is:   Set-Cookie

Question
Which of the following request methods uploads the file enclosed in the entity body of the request to the path specified in the URL of the request line?

a. POST
b. PUT
c. GET
d. HEAD

The correct answer is: PUT

Question
Which of the following are the protocol data units at the Application and Network Layer respectively?
   
a. Segment, Packet
b. Message,  Segment
c. Message, Packet
d. Packet,  Segment

The correct answer is: Message, Packet

Question
What is the total size of source field of UDP Checksum

a. 16 bits
b. 24 bits
c. 32 bits
d. 8 bits

The correct answer is: 32 bits

Question
Which command provides  information about delay measurement from source to  destination?

a. Traceroute
b. Nslookup
c. Netstat
d. None


The correct answer is:  Traceroute




Question

Application developer has permission to decide the following on transport layer side



a) Transport layer protocol

b) Maximum buffer size

c) Both of the mentioned

d) None of the mentioned


a. d
b. c
c. a
d. b
The correct answer is: c

Question
Piggybacking protocol is a technique used for

1.ACKs.
2.NAKs.
3.both 1 and 2.
4.None.

a. 1
b. 4
c. 3
d. 2
The correct answer is: 3

Question
Mobile hosts encapsulates and ______________the packets to mobiles host’s care-of –address

a)binds
b)tunnels
c)fowards
d)None

a. b
b. d
c. a
d. c 
The correct answer is: b

Question
OSPF routing tables are calculated by using______________algorithm

a)Link sate routing
b)Dijkstra’s Algorithm
c)Distance vector routing
d)Prim’s algorithm

a. a
b. b
c. c
d. d
The correct answer is: b

Question
Which of this is not a guided media ?

a) Fiber optical cable
b) Coaxial cable
c) Wireless LAN
d) Copper wire

a. d
b. a
c. c
d. b
The correct answer is: c

Question
BGP is an ________________system routing protocol

a)Autonomous
b)InterAutonomous
c)IntraAutonomous
d)None

a. a
b. b
c. c
d. d
The correct answer is: b

Question
When 2 or more bits in a data unit has been changed during the transmission, the error is called

a) random error
b) burst error
c) inverted error
d) none of the mentioned

a. a
b. d
c. c
d. b
The correct answer is: b

Question
In slow-start algorithm, size of congestion window increases exponentially until it reaches a

1.Frame Relay.
2.Congestion Relay.
3.Threshold.
4.IP.
Select one:
a. c
b. a
c. b
d. d
The correct answer is: c

Question
Which one of the following routing algorithm can be used for network layer design?

a) shortest path algorithm
b) distance vector routing
c) link state routing
d) all of the mentioned

a. d
b. b
c. a
d. c
The correct answer is: d

Question
A mechanism to control amount and rate of traffic sent to network is called

Traffic Congestion.
Traffic Flow.
Traffic Data.
4.Traffic Shaping
Select one:
a. 2
b. 3
c. 1
d. 4
The correct answer is: 4

Question
Which protocol is used for dynamically assigning IP addresses  to hosts on a LAN

a. ARP
b.RARP
c. TCP/IP
d.DHCP

a. a
b. d
c. b
d. c
The correct answer is: d

Question
MobileIP is built on ____________protocol

a)ICMP
b)IP
c)UDP
d)TCP

a. b
b. a
c. c
d. d
The correct answer is: b

Question
12) The packet of information at the application layer is called

a) Packet
b) Message
c) Segment
d) Frame

a. a
b. c
c. b
d. d
The correct answer is: b

Question
Header of a frame generally contains

a) synchronization bytes
b) addresses
c) frame identifier
d) all of the mentioned

a. c
b. a
c. b
d. d
The correct answer is: d

Question
Which of the following is congestion control algorithm?

a. leaky bucket
b. token bucket
c. Resource respondes
d. all of above

a. b
b. a
c. d
d. c
The correct answer is: d

Question
The network layer protocol of internet is

a) ethernet
b) internet protocol
c) hypertext transfer protocol
d) none of the mentioned

a. b
b. d
c. c
d. a
The correct answer is: b

Question
The data link layer takes the packets from _____ and encapsulates them into frames for transmission.

a) network layer
b) physical layer
c) transport layer
d) application layer

a. c
b. b
c. a
d. d
The correct answer is: a

Question
A subset of a network that includes all the routers but contains no loops is called

a) spanning tree
b) spider structure
c) spider tree
d) none of the mentioned

a. d
b. c
c. a
d. b
The correct answer is: a

Question
Which one of the following task is not done by data link layer?

a) framing
b) error control
c) flow control
d) channel coding

a. d
b. a
c. c
d. b
The correct answer is: d

Question
The triplet that contains the home address, care-of address, and registration lifetime is called a _______________ for the mobile node

a)binding
b) registration
c)Unique Number
d)Network address

a. a
b. d
c. c
d. b
The correct answer is: a

Question
ICMP is primarily used for

a) error and diagnostic functions
b) addressing
c) forwarding
d) none of the mentioned

a. c
b. a
c. d
d. b
The correct answer is: a

Question
This is one of the architecture paradigm

a) Peer to peer
b) Client-server
c) HTTP
d) Both a and b

a. b
b. c
c. a
d. d
The correct answer is: d

Question
MAC addresses are  for which layer

a. Network
b.Application
c. Data Link
d.Physical
Select one:
a. c
b. d
c. a
d. b
The correct answer is: c

Question
OSPF is based on which routing technique

a)Link state routing protocol
b)Distance vector routing protocol
c)Both a & b
d)Path Vector protocol

a. b
b. a
c. c
d. d

The correct answer is: a

Question
In MobileIP _____________address indicates the network number and thus identifies the mobile node's point of attachment with respect to the network topology

a)System address
b)IP address
c)Care-off address
d)Home address
Select one:
a. d
b. c
c. b
d. a
The correct answer is: c

Question
A VLAN

a.Can be defined on a single switch
b.Can span multiple switches
c.Can be used across bridges
d. None of the above
Select one:
a. a
b. c
c. d
d. b

The correct answer is: b

Question
Application layer offers _______ service

a) End to end
b) Process to process
c) Both of the mentioned
d) None of the mentioned

a. a
b. c
c. d
d. b

The correct answer is: a

Question
The metric in RIP is called ______________

a)cost
b)hop count
c)distance
d)count

The correct answer is: b

Question
In Congestion Control, packet is put at end of input queue while waiting to be

Checked.
Entered.
Reached.
4.Controlled

Select one:
a. 2
b. 1
c. 3
d. 4

The correct answer is: 1

Question
CRC stands for

a) cyclic redundancy check
b) code repeat check
c) code redundancy check
d) cyclic repeat check

a. d
b. b
c. c
d. a
The correct answer is: a

Question
Consider a situation where user wants to fetch/transfer the data of size 1MB across a 1 Gbps network with a total transfer time of 108ms. What is the effective through put.

Select one:

a. 1Gbps
b. 84.1 Mbps
c. 74.1Mbps
d. 108 Mpbs

The correct answer is: 74.1Mbps

Question

If arrival rate (in bits) to link exceeds transmission rate of link for a period of time
Select one:
a. Nothing will happen
b. packets will queue, wait to be transmitted on link
c. packets can be dropped (lost) if memory (buffer) fills up
d. Both a and b

The correct answer is: Both a and b

Question
Which of the following is an example of a real-time application on a network

Select one:
a. Videoconferencing
b. Internet Radio
c. File Transfer
d. Email

The correct answer is: Videoconferencing

Question
Which of the following represents a multicast message

Select one:
a. Message sent to www.hotmail.com
b. Message sent to Mr. Computer’s email
c. Message sent to all the computers of your organisations network. 

d.Message sent to all the computers in the accounts department on your network

The correct answer isMessage sent to all the computers in the accounts department on your network

Question
Which is correct description of Latency

Select one:
a. Latency = Propagation + Queue + Transmit
b. Latency = Propagation
c. Latency = Propagation + Queue
d. Latency = Propagation + Transmit

The correct answer is: Latency = Propagation + Queue + Transmit

Compiler Design - MCQS


Question
In XYZ. the . at the end represents reduce operation

a. True 
b. False

The correct answer is: True

Question 
Classes of languages accepted by NFA and its equivalent DFA are different

a. False 
b. True

The correct answer is: False

Question
LL parser is an example for Bottom - up parser design

a. True
b. False 

The correct answer is: False

Question
predictive parser can be

a. Constructive
b. Non Recursive
c. Recursive 
d. Recursive and constructive

The correct answer is: Recursive

Question
The run time environment represents recursive call as Activation Record

a. True 
b. False

The correct answer is: True

Question
the statement followed by a conditional jump is a leader

a. True 
b. False

The correct answer is: True

Question
Which of the following software tool  is  a parser generator ?

a. YACC 
b. Lex
c. Lex & YACC
d. None of these

The correct answer is: YACC

Question
Push - Down Automata is used for parser designs

a. True 
b. False

The correct answer is: True

Question
In DAG form of the Abstract Syntax Tree the common sub-expressions are

eliminated
a. False
b. True 

The correct answer is: True

Question
Parsing is also Known as:

a. Syntax Analysis 
b. Lexical Analysis
c. Code generation
d. Semantic  Analysis

The correct answer is: Syntax Analysis

Question
In a two pass assembler the object code generation is done during the ?

a. None of these
b. First pass
c. Zeroed  Pass
d. Second pass 

The correct answer is: Second pass

Question
The intermediate code representation for JAVA is

a. Java byte code 
b. Java source
c. MSIL
d. Java CIL

The correct answer is: Java byte code

Question
Yet Another Compiler's Compiler  is a tool for

a. code optimization
b. Syntax analysis
c. Lexical analysis 
d. Intermediate code generation

The correct answer is: Syntax analysis

Question
The first and last statements in a Basic block can be leaders

a. False 
b. True

The correct answer is: False

Question
The linux command grep stands

a. none of the above
b. gedit row edit print
c. global regular execute pattern
d. globally search a regular expression and print 

The correct answer is: globally search a regular expression and print

Question
copy statement x = y is not in three address code format

a. False 
b. True

The correct answer is: False

Question
x = y + z is an example for three - address code

a. False
b. True 

The correct answer is: True

Question
In X.YZ the . in between  represents shift operation

a. True
b. False 

The correct answer is: True

Question
LR parser is an example for Top - down design for parser

a. False 
b. True

The correct answer is: False

Question
The statement followed by an unconditional jump is a leader

a. True 
b. False


The correct answer is: False

Question
Top down parsing is also known as 

A. LR parser
B. LL parser 
C. LALR parser
D. None of the above

The correct answer is: LL parser

Question
In a context free grammar

A. ε can not be the right hand side of any production
B. Terminal symbols can not be present in the left hand side of any production
C. The number of grammar symbols in the LHS is not greater than the number of grammar symbols in the RHS
D. All of the above 

The correct answer is: Terminal symbols can not be present in the left hand side of any production

Question
A given grammar is said to be ambiguous if

a. A derivation tree has more than one associated sentence
b. Parentheses are not present in the grammar
c. Two or more production has the same non-terminal on the LHS
d. There is a sentence with more than one derivation tree corresponding to it 

The correct answer is: There is a sentence with more than one derivation tree corresponding to it

Question
Lexical analyzer can not eliminate white spaces

True
False 

The correct answer is 'False'.

Question
Lexical Analyzer is the only phase which reads the complete source program.

True 
False

The correct answer is 'True'.

Question
The Grammar S --> Aa | b    S --> Ac | Sd is not left recursive.

True
False 

The correct answer is 'False'.

Question
FOLLOW set can be computed for both terminal and variable/non terminal.

True
False 

The correct answer is 'False'.

Question
Regular expressions are an important notation for specifying tokens

True
False 

The correct answer is 'True'.

Question
YACC is a:

A. Lexical analyzer generator
B. Parser generator 
C. Semantic analyzer
D. None of the above

The correct answer is: Parser generator

Question
The symbol table is a data structure containing a record for each variable name, with fields for the attributes of the name.

True 
False

The correct answer is 'True'.

Question
The most preferred data structure to implement Symbol table is Hash table.

True 
False

The correct answer is 'True'.

Question
The grammar S --> a S b | b S a can be used to generate palindromes over {a, b}

True 
False

The correct answer is 'True'.

Question
An ideal Compiler should

A. Be smaller in size
B. Takes less time for compilation
C. Be written in a high level language
D. All of the above 

The correct answer is: All of the above

Question
In regular expression notation * represents one or more occurrence of the preceding symbol. 

True
False 

The correct answer is 'False'.

Question
Finite automata can be used to count the number of symbols read.

True 
False

The correct answer is 'False'.

Question
What are the stages in the compilation process?

A. Feasibility study system design and testing
B. Implementation and documentation
C. Lexical analysis, syntax analysis and code generation 
D. All of the above

The correct answer is: Lexical analysis, syntax analysis and code generation

Question
Shift reduce parsing is a type of Top down design.

True
False 

The correct answer is 'False'.

Question
The language recognised by DFA is known as

a. Non CFL
b. Non Regular Language
c. Regular language 
d. Context Free Language

The correct answer is: Regular language

Question
A top down parser generates 

a. Right most derivation in reverse
b. Right most derivation
c. Left most derivation 
d. Left  most derivation in reverse

The correct answer is: Left most derivation

Question
A bottom up parser generates

a. Right most derivation in reverse 
b. Right most derivation
c. Left most derivation
d. Left  most derivation in reverse

The correct answer is: Right most derivation in reverse

Question
If X is a terminal then FIRST(X) = X

True 
False

The correct answer is 'True'.

Question
The main difference between DFA and NDFA
a. In NDFA from any given state there cannot be any alphabet leading to two different states
b. In NDFA empty transition may be present
c. 
In DFA from any given state there cannot be any alphabet leading to two different states 
d. In DFA empty transition may be present

The correct answer is: In DFA from any given state there cannot be any alphabet leading to two different states

Question
Top down parsing is also known as 

A. LR parser
B. LL parser 
C. LALR parser
D. None of the above

The correct answer is: LL parser

Question
In a compiler, grouping of characters into tokens is done by the

a. Scanner 
b. Code optimizer
c. Code generator
d. Parser

The correct answer is: Scanner

Question
Given grammar 

S --> (L) | a

L --> L, S | S

Which of the input recognised by the grammar

A. ((a, a), a)
B. (a,a) 
C. ((a, a,a),a)
D. All of the above

The correct answer is: All of the above

Question
Regular expression   letter ( letter | digit)*  can be used to recognise set of valid identifiers.

True 
False

The correct answer is 'True'.

Question
In Left most derivation left most terminal should be replaced by a terminal or non terminal.

True
False 

The correct answer is 'False'.

Question
If S is the Start symbol, then end marker $ should be placed in FOLLOW of S.

True 
False

The correct answer is 'True'.

Question
Construction of DFA is easy and implementation of DFA is difficult

True 
False

The correct answer is 'True'.

Question
In LL parser, LL stands for

a. Left to right and LMD  
b. Right to left
c. Left to right
d. Left to right reducing


The correct answer is: Left to right and LMD

Question.
For which of the following reason, a compiler is preferred to a interpreter
Select one:
a. It can generate stand-alone programs and often takes less time for execution
b. Debugging can be faster and easier

Answer: It can generate stand-alone programs and often takes less time for execution

Question.
To design LL parser the grammar should be free from left recursion
Select one:
a. True
b. False

Answer: True

Question.
A syntax tree
Select one:
a. generates tokens
b. Another name of the parse tree
c. Should not have keywords as leaves
d. Is a condensed form of grammar

Answer: Another name of the parse tree

Question.
Regular expression letter ( letter | digit)* can be used to recognise set of valid identifiers.
Select one:
a. True
b. False

Answer: True



Question.
In X.YZ the . in between represents shift operation
Select one:
a. False
b. True

Answer: True

Question.
FIRST of a terminal is always a terminal
Select one:
a. False
b. True

Answer: True

Question.
LL parser is an example for Bottom – up parser design
Select one:
a. True
b. False

Answer: False

Question.
Yet Another Compiler’s Compiler is a tool for
Select one:
a. code optimization
b. Intermediate code generation
c. Lexical analysis
d. Syntax analysis

Answer: Syntax analysis

Question.
Push – Down Automata is used for parser designs
Select one:
a. False
b. True

Answer: True

Question.
x = y + z is an example for three – address code
Select one:
a. True
b. False

Answer: True



Question.
LR parser is an example for Top – down design for parser
Select one:
a. False
b. True

Answer: False

Question.
FOLLOW set is computed for only non-terminals/variables
Select one:
a. False
b. True

Answer: True

Question.
Control Flow Graph uses stack based address format
Select one:
a. True
b. False

Answer: False