USE THIS SEARCH BOX AND GET MORE QUESTIONS UPDATES

Saturday, July 30, 2016

OS Concepts

(1) When the result of computation depends on the speed of the processes involved there is said to be
A deadlock A time lock Cycle stealing Race condition

(2) Consider a counting semaphore which was initialized to 10 and then 6P (wait) operation and 4v (signal) operations were completed on this semaphore. What is the resulting value of semaphore?
10 9 8 0

(3) Software interrupt is required by the processor to
Return from subroutine Obtain system services, which need execution of privileged instruction Test the interrupt system of the processor Implement co-routines

(4) How many child processes are created if a process executes the code fork();fork();fork();
5 8 7 9

(5) If hardware does not support _________ a multi-user, multi-processing operating system cannot be implemented.
At least two modes of CPU execution Demand paging DMA for disk transfer Address translation

Friday, July 29, 2016

Programming and data structures questions and answers

1.Consider a program that reads 500 integers in the range of [0, 100] that represents the score of 500 students. Frequency of each score above 50 is then printed. For the program to store the frequencies the best way is
A dynamically allocated array of 550 numbers An array of 100 numbers An array of 500 numbers An array of 50 numbers

2.What is the goal of structured programming?
Able to infer the flow of control from the program text Able to infer the flow of control from the Compiled code To avoid the use of GOTO statements None of the above

3.To check whether an arithmetic expression has balanced parenthesis, the best data structure that can be used is
Stack Tree List Queue

4.Consider a stack S of size n ≥ 1 which is initially empty. In an empty stack first n natural numbers are pushed in sequence and then n pop operations are performed. Push and pop operations take x seconds each. The time elapse between the end of one stack operation and the start of the next operation is y. For m ≥ 1, define the stack-life of m as the time elapsed from the end of push (m) to the start of the pop operation that removes m from stack S. What is the average stack-life of an element of this stack?
3y + 2x n (x + y) - x n (x + y) y + 2x

5.The logic programming languages and functional languages have the common properties that
Both use Horn-clauses Both are declarative Both are procedural languages Both are based on -calculus.

Saturday, July 23, 2016

Compiler Design questions and answers

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.We have a grammar with not epsilon and unit production (i.e. of type A->ε and
2n - 1 2n n - 1 n/2

4.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

5.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

Friday, July 22, 2016

Database test questions for interview

1.The two relation schemes R1 (A, B) and R2 (C, D) has two corresponding relation instances r1 and r2. B from R1 is the foreign key that refers to C in R2. The statement that always holds true if data in r1 and r2 satisfy referential integrity constraints is
πB (r1) – πC (r2) ≠E πB (r1) = πC (r2) πB (r1) – πC (r2) = E πC (r2) – πB (r1) = E

2.The relation R that has x number of tuples is joined with relation S that has y number of tuples. The maximum and minimum sizes of join respectively are
xy and x + y x + y and I x - yI xy and 0 x + y and 0

3.Consider a B+ tree in which order of the internal node is 3 and that of the leaf node is 2. The key values are inserted into this tree in the order given as 10, 3, 6, 8, 4, 2, 1. The order of the internal node is the maximum number of tree pointers in each node and the order of the leaf node is the maximum number of data items that can be stored in it. Assume that the B+ tree is initially empty. As a result of this iteration the maximum number of times leaf nodes would get split up is
2 3 4 5

4.Which one of the following statement is incorrect for the basic ER and relational models?
An attribute of an entity can be composite An attribute of an entity can have more than one value An attribute can have exactly one value or a NULL value in a row of a relational table An attribute can have more than one value in a row of a relational table.

5. Which one of the following statement about B+ trees is correct?
B+ trees are for secondary indexes and B trees are for primary indexes B+ trees are for main memory and B trees are for storing data on disk B+ trees height is independent of the number of records On B+ trees range queries are faster

Saturday, July 16, 2016

Algorithm questions and answers

(1) Starting from the root and performing ____________, level order traversal of a rooted tree can be done.
Breadth first search Depth first search In-order traversal Pre-order traversal

(2) We have a hash function and a hash table. The size of hash table is 7 with starting index zero. The hash function is (3x+4) mod 7. Assume that initially the hash table is empty and the sequence 1, 3, 8, 10 is inserted into the table using closed hashing. The content of the table is (‘_’ denotes an empty location in the table)
1, _, _, _, _, _, 3 8, _, _, _, _, _, 10 1, 8, 10, _, _, _, 3 1, 10,8, _, _, _, 3

(3) Which one of the following statement is false if G is an undirected graph with distinct edge weight, Emax is the edge with maximum weight and Emin is the edge with minimum weight?
Emin is present in every minimum spanning tree of G Emax is not present in any minimum spanning tree. The removal of Emax must disconnect G, if Emax is in a minimum spanning tree. G has a unique minimum spanning tree.

(4) Consider an array L. If an element in an array L is greater than all elements to the right of it then it is called a leader. The best algorithm to find all leaders in an array
Solves it in time θ (n²) Solves it in linear time using a left to right pass of the array Solves it in linear time using a right to left pass of the array Solves it using divide and conquer in time θ (n logn)

(7) Consider a complete n-array tree. This tree is such that each node has either n number of children or no children. Let l = 10 be the number of internal nodes and L = 41 be the number of leaves in a complete n-array tree. The value of n is
5 4 3 2

Friday, July 15, 2016

Operating system test questions for interview

(1) The use of __________ works on the principle of locality.
Cache memory Interrupts Polling DMA

(2) Consider a computer system with 6 tape drives and n processes completing for them. What is the maximum value of n for the system to be deadlock free assuming each processes may need 3 tape drives?
3 2 4 7

(3) When size of the memory is increased the page replacement policy that sometimes leads to more page faults is
FIFO Optimal LRU None of the above

(4) The capacity of a memory unit = The number of words x The number of bits/words. For the memory of 4k x 16 the number of separate address and data lines needed is
12 address and 16 data lines 12 address and 12 data lines 11 address and 6 data lines 12 address and 8 data lines

(5) A system has m number of resources of same type and 3 processes A, B and C. share these resources. A, B and C have the peak demand of 3, 4 and 6 respectively. Deadlock will not occur if
m = 15 m = 8 m = 13 m = 9

Saturday, July 9, 2016

Web technologies questions and answers

(1) Out of the options given below the one, which is not a client server application is
Ping E-mail Web browsing Internet chat

(2) We have an HTML form that is to be designed to enable purchase of office stationary. For the items that are selected mark it with check. Submit button is to be pressed ones the credit card details are filled. Assuming that security is handled in a way that is transparent to the form design, the option that would be appropriate for sending the data to the server is
Only POST Only GET Either GET or POST Neither GET nor POST

(3) The objects that can be used in expression and scriplets in JSP without explicitly declaring them is
Response and session only Session and request only Request and response only Session, request and response

(4) _____________ indicates a correct association of the three commands PROMPT, HEAD and RCPT with protocols where these are used
FTP, HTTP, SMTP HTTP, FTP,SMTP SMTP,HTTP,FTP HTTP, SMTP,FTP

(5) Which one of the following statement about HTTP is false?
It can be used to test the validity of a hypertext links It allows information to be stored in a UR It runs over TCP protocol It describes the structure of web pages

Friday, July 8, 2016

Software Engineering questions and answers

(1) Each of the modules A and B shown in the figure below has cyclomatic complexity 10. The cyclomatic complexity of the sequential integration of A and B is

20 22 19 10

(2) For the good software requirement specifications (SRS) document
Goals of implementation are not desired. Algorithm for software implementation is not desired Non-functional requirements are not desired Functional requirements are not desired

(3) A software for digital signal processing which is expected to have 40000 lines of code needs to be developed by a company. This software is to be developed using the basic COCOMO model and for this the company needs to determine the effort in person-months. For the software development on the embedded system, the multiplicative factor for this model is 2.8 and the exponentiation factor is 1.20. The estimated effort in person month is
287.47 950.35 234.25 122.5

(4) Three statements about the cyclomatic complexity of the control flow graph as a program module are given below:
I) The cyclomatic complexity of a modules level to maximum number of linear independent circuits in a graph.
II) The cyclomatic complexity of a module is the addition of the number of number of decisions in the module and the one where a decision is effectively any conditional statements in the 

module.
III) The cyclomatic complexity can also be used as number of linearly independent paths that should be tested during path coverage testing.
The statements that hold true for the cyclomatic complexity is
II and III I and II I and III I, II and III

(5) We have different modules of software whose coupling is categorized as follows:
a. Content coupling
b. Common coupling
c. Control coupling
d. Stamp coupling
e. Data coupling

Which one of the following option indicates the coupling between modules ranked in the order of strongest (least desirable) to weakest (most desirable)?
b, d, a, c, e a, c, e, b, d e, d, c, b, a a, b, c, d, e

Saturday, July 2, 2016

Computer Architecture Organization questions and answers

(6) If 1Mbyte is the board memory of a graphics card then the mode, which does not support card, is
On a 14” monitor 1600x400 resolution with 16 million colors On a 17” monitor 1600x400 resolution with 256 colors On a 17” monitor 800x400 resolution with 16 million colors On a 14” monitor 800x800 resolution with 256 colors

7.A CPU is connected with a device that is transferring data byte wise, at the rate of10Kbyte/s. Interrupt overhead = 4μs. The byte transfer time between the device interfaces register and CPU or memory is negligible. The minimum performance gain of operating the device under interrupt mode over operating it under program-controlled mode is
5 15 25 35

8.A CPU that runs at a frequency of 1GHz has a five-stage pipeline. In the first stage of the pipeline, instructions are fetched. A conditional branch instruction computes the target address and evaluation of the condition is done in the third stage of the pipeline. Until the outcome of the conditional branch is known the process does not fetch the new instruction. In this program out of 109 instructions 20% are instruction of conditional branching. What will be the total execution time of the program is each instruction takes one cycle to complete on average?
1.0s 1.1s 1.2s 1.3s

9.The one that does not interrupt a running process is
Scheduler process Power failure A device Timer

10.3 clock cycles are required for register to/from memory transfer. 1 clock cycle is required for Add with both operands in register and 2 clock cycles per word are required for instruction fetch and decode. What are the total number of clock cycles required to execute the program?
35 28 30 24

Friday, July 1, 2016

Computer Architecture Organization

(1) In a computer, whose average memory access time is 20ns has the page fault service time 10Ms. For every 106 memory accesses one page fault is generated. The effective access time for the memory is
10ns 43ns 30ns 25ns

(2) Let T1 be the time taken for a single instruction on a pipelined CPU and T2 be the time take for a single instruction on a non-pipelined but identical CPU. Comparing T1 and T2 we can say that
T1=T2 + the time taken for one instruction fetch cycle T1 T1≤T2 T1≥T2

(3) The number of bits needed for cache indexing is
10 15 5 20

(4) The number of tag bits needed is
17 20 22 25

(5) A and B are the data inputs and Y is the control input of a multiplexer. When Y = 0 data input A is selected and when Y = 1 data input B is selected. The connections required to realize the 2-variable Boolean function f = X+Z, without using any additional hardware are
X to A, 0 to B, Z to Y Z to A, 1 to B, 0 to Y Z to A, 1 to B, X to Y X to A, 1 to B, Z to Y