USE THIS SEARCH BOX AND GET MORE QUESTIONS UPDATES

Sunday, August 21, 2016

Computer Networks

1.For real time multimedia, file transfer, DNS and email, the transport layer protocols used are respectively
TCP, UDP, TCP and UDP UDP, UDP, TCP and TCP UDP, TCP, UDP and TCP TCP, TCP, UDP and UDP

2.A device that can look at all protocol headers up to the transport layer is called l ayer-4 firewall. Which one of the following statement is true layer-4 firewall?
It cannot block all ICMP traffic It cannot block entire HTTP traffic during 9:00pm and 5:00am It cannot block TCP traffic from a specific user on a multi-user system during 9:00pm and 5:00am It cannot stop incoming traffic from a specific IP address but allow outgoing traffic to the same address

3.The source and destination are connected through two intermediate routers. During the data transmission from source to destination how many times each packet has to visit the network layer and the data link layer?
Network layer – 6 times and data link layer – 4 times Network layer – 4 times and data link layer – 2 times Network layer – 4 times and data link layer – 6 times Network layer – 2 times and data link layer – 3 times

4.For the application layer in the Internet stack, the protocol data unit (PDU) is
Datagram Message Frame Segment

5.The transport layer protocols that is used to support electronic mail is
TCP SMTP UDP IP

Saturday, August 20, 2016

Compiler Design

1. In compilers generation of intermediate code based on an abstract machine model is useful because
Syntax-directed translations can be written for intermediate code generation To generate code for real machines directly from high-level language programs is not possible Portability of the front end of the compiler is enhanced Implementation of lexical and syntax analysis is easier

2.Which one of the following statement is false for the SLR (1) and LALR (1) parsing tables for a context free grammar?
The reduce entries in both the tables may be different The error entries in both the tables may be different The go to part of both tables may be different The shift entries in both the tables may be identical

3.Only two registers are available in the instruction set architecture of the processor. The code motion moves the statements from one place to another while preserving correctness. The only allowed complier optimization is code motion. In the compiled code, the minimum number of spills to memory is
0 1 2 3

4.Assume that no other optimization other than optimizing register allocation is applied. To compile this code segment without any spill to memory the minimum number of registers needed in the instruction set architecture of the processor is
3 6 4 5

5.The languages that need heap allocation in the runtime environment are
Those that use global variables Those that use dynamic scoping Those that support recursion Those that allow dynamic data structure

Friday, August 19, 2016

Programming and data structures

1.Which one of the following statement is true for Abstract Data type (ADT)?
It is same as an abstract class It is a data type for which only the operations defined on it can be used but none else It is the data type that cannot be instantiated None of the above.

2.Consider a binary tree that is initially empty. The numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in a binary tree in that order. The binary search tree uses the usual ordering on natural numbers. The in-order traversal sequence of the resultant tree will be
7 6 5 4 8 9 0 1 2 3 1 9 2 7 3 8 5 6 0 4 0 1 2 3 4 5 6 7 8 9 0 3 2 5 6 4 8 1 9 7

3.Faster access to non-local variables is achieved using an array of pointers to activation records called a
Activation tree Stack Heap None of the above

4.The programming language feature that cannot be implemented on a certain processor, which supports only immediate and the direct addressing modes is
Pointers Records Arrays Recursive procedures with local variables

Saturday, August 13, 2016

Theory of Computation questions and answers

1.From the options given below, the pair having different expressive power is
Deterministic Push Down Automata (DPDA) and Non-deterministic Push Down Automata (NPDA) Deterministic Finite Automata (DFA) and Non-deterministic Finite Automata(NFA) Single tape turning machine and multi tape turning machine Deterministic single tape turning machine and Non-Deterministic single tape turning machine

2.The problem that is undecidable -
Finiteness problem for FSA’s Membership problem for CFG’s Equivalence problem for FSA’s Ambiguity problem for CFG’s

3.The language which is generated by the grammar S-> aSa I bSb I a I b over the alphabet {a, b} is the set of
Strings that begin and end with the same symbol All odd and even length palindromes All odd length palindromes All even length palindromes

4.Two persons X and Y have been asked to show that a certain problem p is NP-complete. X shows a polynomial time reduction from the 3-SAT problem to p and Y shows a polynomial time reduction from p to 3-SAT. From these reduction it can be inferred that
π is NP-complete π is NP-hard but not NP-complete π is in NP but not NP-complete π is neither NP-hard nor in NP

5.Out of the three problems S, Q and R, S is an NP-complete problem and Q and R are the two other problems not known to be in NP. Which one of the following statements is true if Q is polynomial time reducible to S and S is the polynomial time reducible to R?
Q is NP-complete R is NP-complete Q is NP-hard R is NP-hard

Friday, August 12, 2016

Computer Networks test questions

1.We have two hosts A and B that are using sliding window protocol for flow control, and to transfer data from A to B full duplex link is used. The send window size and receive window size is 5 packets each. Data packets that are sent only from A to B are all 1000byte long and the transmission time for such a packet is 50µs. Acknowledgement packets that are sent only from B to A are very small and it requires negligible transmission time. In this communication the maximum achievable throughput, if the propagation delay over the link is 200µs, is
9.12 x 106 bps 10.09 x 106 bps 12.33 x 106 bps 11.11 x 106 bps

2.Which one of the following statement does not hold true about Internet protocol (IP)
IP packets from the same source to the same destination can take different routes in the network If the packet is unable to reach its destinations within a given number of hops, IP ensures that a packet is discarded A computer can have multiple IP address All of the above

3.Let computer A and computer B that have the IP addresses 10.105.1.113 and 10.105.1.91 respectively use the same net mask N. For A and B to belong to same network, the value of N should not be
255.255.255.224 255.255.255.0 255.255.255.128 255.255.255.192

4.Consider the packets are correctly delivered. In the best case, how many bytes including headers are delivered to the IP layer at the destination, for one application message? Consider only data packets
200 220 240 260

5.Neglecting errors, acknowledgements and other overheads, the rate at which application data is transferred to host Hc, is
150.8kbps 245.6kbps 400.9kbps 354.5kbps