## ISRO CS 2013

Question 1 |

In graphics, the number of vanishing points depends on

the number of axes cut by the projection plane | |

the centre of projection | |

the number of axes which are parallel to the projection plane | |

the perspective projections of any set of parallel lines that are not parallel to the projection plane |

Question 1 Explanation:

→Projections of lines that are not parallel to the view plane (i.e. lines that are not perpendicular to the view plane normal) appear to meet at some point on the view plane.

→This point is called the vanishing point. A vanishing point corresponds to every set of parallel lines.

→This point is called the vanishing point. A vanishing point corresponds to every set of parallel lines.

Question 2 |

The built-in base class in Java, which is used to handle all exceptions is

Raise | |

Exception | |

Error | |

Throwable |

Question 2 Explanation:

Throwable class is the built-in base class used to handle all the exceptions in Java.

Question 3 |

Opportunistic reasoning is addressed by which of the following knowledge representation

Script | |

Blackboard | |

Production Rules | |

Fuzzy Logic |

Question 3 Explanation:

→ Opportunistic reasoning:

It is a method of selecting a suitable logical inference strategy within artificial intelligence applications.

Opportunistic reasoning has been used in applications such as blackboard systems and medical applications.

→ Specific reasoning methods may be used to draw conclusions from a set of given facts in a knowledge base, e.g. forward chaining versus backward chaining.

→ However, in opportunistic reasoning, pieces of knowledge may be applied either forward or backward, at the "most opportune time".

→ An opportunistic reasoning system may combine elements of both forward and backward reasoning.

→ It is useful when the number of possible inferences is very large and the reasoning system must be responsive to new data that may become known.

It is a method of selecting a suitable logical inference strategy within artificial intelligence applications.

Opportunistic reasoning has been used in applications such as blackboard systems and medical applications.

→ Specific reasoning methods may be used to draw conclusions from a set of given facts in a knowledge base, e.g. forward chaining versus backward chaining.

→ However, in opportunistic reasoning, pieces of knowledge may be applied either forward or backward, at the "most opportune time".

→ An opportunistic reasoning system may combine elements of both forward and backward reasoning.

→ It is useful when the number of possible inferences is very large and the reasoning system must be responsive to new data that may become known.

Question 4 |

The following steps in a linked list

p = getnode()

info (p) = 10

next (p) = list

list = p

result in which type of operation?

p = getnode()

info (p) = 10

next (p) = list

list = p

result in which type of operation?

pop operation in stack | |

removal of a node | |

inserting a node | |

modifying an existing node |

Question 4 Explanation:

p = getnode() // Allocating memory for node and starting address of that node will store in the pointer “p”

info (p) = 10 // Storing the value of 10 into the info field of new node

next (p) = list // adding new node to the existing list.

list=p // the starting address of the list will

point to the new node

info (p) = 10 // Storing the value of 10 into the info field of new node

next (p) = list // adding new node to the existing list.

list=p // the starting address of the list will

point to the new node

Question 5 |

Shift reduce parsing belongs to a class of

bottom up parsing | |

top down parsing | |

recursive parsing | |

predictive parsing |

Question 5 Explanation:

→ A shift-reduce parser is a class of efficient, table-driven bottom-up parsing methods for computer languages and other notations formally defined by a grammar.

→ The parsing methods most commonly used for parsing programming languages, LR parsing and its variations, are shift-reduce methods.

→ The parsing methods most commonly used for parsing programming languages, LR parsing and its variations, are shift-reduce methods.

Question 6 |

Which of the following is not provided as a service in cloud computing?

Infrastructure as a service | |

Architecture as a service | |

Software as a service | |

Platform as a service |

Question 6 Explanation:

→Cloud computing is the delivery of computing services—servers, storage, databases, networking, software, analytics, intelligence and more—over the Internet (“the cloud”) to offer faster innovation, flexible resources and economies of scale.

→Most cloud computing services fall into four broad categories: infrastructure as a service (IaaS), platform as a service (PaaS), serverless and software as a service (SaaS).

→Most cloud computing services fall into four broad categories: infrastructure as a service (IaaS), platform as a service (PaaS), serverless and software as a service (SaaS).

Question 7 |

The binary equivalent of the decimal number 42.75 is

101010.110 | |

100110.101 | |

101010.101 | |

100110.110 |

Question 7 Explanation:

(42.75)10 = (?)2

Question 8 |

Which logic gate is used to detect overflow in 2’s complement arithmetic?

OR gate | |

AND gate | |

NAND gate | |

XOR gate |

Question 8 Explanation:

Question 9 |

The number of edges in a ‘n’ vertex complete graph is ?

n * (n-1) / 2 | |

n * (n+1) / 2 | |

n ^{2} | |

n * (n+1) |

Question 9 Explanation:

Complete graph is an undirected graph in which each vertex is connected to every vertex, other than itself. If there are ‘n’ vertices then total edges in a complete graph is n(n-1)/2

Question 10 |

What is the right way to declare a copy constructor of a class if the name of the class is MyClass?

MyClass (constant MyClass *arg) | |

MyClass (constant MyClass &arg) | |

MyClass (MyClass arg) | |

MyClass (MyClass *arg) |

Question 10 Explanation:

→Copy Constructor is a type of constructor which is used to create a copy of an already existing object of a class type.

→Declaration of copy constructor syntax is different from c++ to java.

→In C++, It is usually of the form class-name (Class_name &vn),

→In Java, the syntax is Class_name(class_name vn).

→So w.r.to C++ , option (B) is correct and w.r.to Java option (c ) is correct.

→Declaration of copy constructor syntax is different from c++ to java.

→In C++, It is usually of the form class-name (Class_name &vn),

→In Java, the syntax is Class_name(class_name vn).

→So w.r.to C++ , option (B) is correct and w.r.to Java option (c ) is correct.

Question 11 |

When two BCD numbers 0x14 and 0x08 are added what is the binary representation of the resultant number?

0x22 | |

0x1c | |

0x16 | |

results in overflow |

Question 11 Explanation:

In the BCD numbering system, a decimal number is separated into four bits for each decimal digit within the number. Each decimal digit is represented by its weighted binary value performing a direct translation of the number. So a 4-bit group represents each displayed decimal digit from 0000 for a zero to 1001 for a nine

Representation of the above two numbers in the 4-bit number format as follows

0x14 = 0001 0100

0x08 = 0000 1000

1. After performing the addition of the two binary numbers , we will get 0001 110

2. The lower value of BCD is 0000 which is 0 and upper value is1001 which is 9 If the four bit result of addition is greater than 9 and if a carry bit is present in the result then it is invalid and we have to add 6 whose binary equivalent is (0110)

The result from the BCD addition is greater than 9,So we need to add to “6” to the result.

0001 1100

0000 0110

--------------

0010 0010 (22)

So, the final resultant number is 22

Representation of the above two numbers in the 4-bit number format as follows

0x14 = 0001 0100

0x08 = 0000 1000

1. After performing the addition of the two binary numbers , we will get 0001 110

2. The lower value of BCD is 0000 which is 0 and upper value is1001 which is 9 If the four bit result of addition is greater than 9 and if a carry bit is present in the result then it is invalid and we have to add 6 whose binary equivalent is (0110)

_{2}to the result of addition. Then the resultant that we would get will be a valid binary coded numberThe result from the BCD addition is greater than 9,So we need to add to “6” to the result.

0001 1100

0000 0110

--------------

0010 0010 (22)

So, the final resultant number is 22

Question 12 |

Which of the following sorting algorithms has the minimum running time complexity in the best and average case?

Insertion sort, Quick sort | |

Quick sort, Quick sort | |

Quick sort, Insertion sort | |

Insertion sort, Insertion sort |

Question 12 Explanation:

Question 13 |

The number 1102 in base 3 is equivalent to 123 in which base system?

4 | |

5 | |

6 | |

8 |

Question 13 Explanation:

Let us consider the base be ‘x’.

(1102)

= 1x3x3x3 + 1x3x3 + 2 = 1x

= 27 + 9 + 2 = 1x

= x = 5

(1102)

_{3}= (123)_{x}= 1x3x3x3 + 1x3x3 + 2 = 1x

^{2}+ 2x + 3= 27 + 9 + 2 = 1x

^{2}+ 2x + 3= x = 5

Question 14 |

The number of elements in the power set of the set {{A,B},C} is

7 | |

8 | |

3 | |

4 |

Question 14 Explanation:

For ‘n’ elements in a set, there are 2

Given set = {{A, B},C}

Power set = { {{A, B}}, {C}, {{A, B}, C}}, ϕ}

So, total 4 elements are present in the power set.

^{n}elements in the corresponding power set.Given set = {{A, B},C}

Power set = { {{A, B}}, {C}, {{A, B}, C}}, ϕ}

So, total 4 elements are present in the power set.

Question 15 |

What are the final states of the DFA generated from the following NFA?

q _{0}, q_{1}, q_{2} | |

[q _{0}, q_{1}], [q_{0}, q_{2}], [ ] | |

q _{0}, [q_{1}, q_{2}] | |

[q _{0}, q_{1}], q_{2} |

Question 15 Explanation:

→An epsilon transition allows an automaton to change its state spontaneously, i.e. without consuming an input symbol.

→From the diagram, initially “q2” is final state.

→As there is epsilon transitions from qo to q1 and q1 to q2 and finally we reach the end state so q0,q1 are part of final states then q0,q1 and q2 are final states.

→From the diagram, initially “q2” is final state.

→As there is epsilon transitions from qo to q1 and q1 to q2 and finally we reach the end state so q0,q1 are part of final states then q0,q1 and q2 are final states.

Question 16 |

How many diagonals can be drawn by joining the angular points of an octagon?How many diagonals can be drawn by joining the angular points of an octagon?

14 | |

20 | |

21 | |

28 |

Question 16 Explanation:

→A polygon's diagonals are line segments from one corner to another (but not the edges).

→The number of diagonals of an n-sided polygon is: n(n − 3) / 2.

→Examples:

→The number of diagonals of an n-sided polygon is: n(n − 3) / 2.

→Examples:

Question 17 |

Let P(E) denote the probability of the occurrence of event E. If P(A) = 0.5 and P(B) = 1, then the values of P(A/B) and P(B/A) respectively are

0.5, 0.25 | |

0.25, 0.5 | |

0.5, 1 | |

1, 0.5 |

Question 17 Explanation:

Given data is

→P(E) denote the probability of the occurrence of event E

→P(A) = 0.5 and P(B) = 1

→Conditional probability is a measure of the probability of an event (some particular situation occurring) given that another event has occurred.

→If the event of interest is A and the event B is known or assumed to have occurred, "the conditional probability of A given B", or "the probability of A under the condition B", is usually written as P(A | B), or P

→P(A/B) = P(A ∩ B)/P(B)

→If two events A and B are independent, then the probability of both events is the product of the probabilities for each event: P(A ∩ B) = P(A)P(B)

→P(A/B) = P(A) * P(B) / P(B)

→P(A/B) = 0.5

→Similarly, P(B/A) = P(A) * P(B) / P(A) and P(B/A) = 1

→P(E) denote the probability of the occurrence of event E

→P(A) = 0.5 and P(B) = 1

→Conditional probability is a measure of the probability of an event (some particular situation occurring) given that another event has occurred.

→If the event of interest is A and the event B is known or assumed to have occurred, "the conditional probability of A given B", or "the probability of A under the condition B", is usually written as P(A | B), or P

_{B}(A)→P(A/B) = P(A ∩ B)/P(B)

→If two events A and B are independent, then the probability of both events is the product of the probabilities for each event: P(A ∩ B) = P(A)P(B)

→P(A/B) = P(A) * P(B) / P(B)

→P(A/B) = 0.5

→Similarly, P(B/A) = P(A) * P(B) / P(A) and P(B/A) = 1

Question 18 |

Which of the following strategy is employed for overcoming the priority inversion problem?

Temporarily raise the priority of lower priority level process | |

Have a fixed priority level scheme | |

Implement kernel preemption scheme | |

Allow lower priority process to complete its job |

Question 18 Explanation:

Priority inversion is the condition in which a high priority task needs to wait for a low priority task to release a resource between the medium priority task and a low priority task.

Question 19 |

What is the maximum number of characters (7 bits + parity ) that can be transmitted in a second on a 19.2 kbps line? This asynchronous transmission requires 1 start bit and 1 stop bit.

192 | |

240 | |

1920 | |

1966 |

Question 19 Explanation:

In asynchronous transmission mode, start bit and and stop bit is always required whereas in synchronous mode these bits are not required.

In the given question asynchronous transmission is mentioned and number of bits required is 10 bits. (7 data bits + 1 parity bit + 1 start bit + 1 stop bit )

Bandwidth = 19.2 kbps

Maximum number of characters transmitted in 1 second = (19.2 *1000)/10 = 1920

In the given question asynchronous transmission is mentioned and number of bits required is 10 bits. (7 data bits + 1 parity bit + 1 start bit + 1 stop bit )

Bandwidth = 19.2 kbps

Maximum number of characters transmitted in 1 second = (19.2 *1000)/10 = 1920

Question 20 |

IEEE 1394 is related to

RS-232 | |

USB | |

Firewire | |

PCI |

Question 20 Explanation:

→ IEEE 1394 is an interface standard for a serial bus for high-speed communications and isochronous real-time data transfer.

→ It was developed in the late 1980s and early 1990s by Apple, which called it FireWire.

→ The copper cable it uses in its most common implementation can be up to 4.5 metres (15 ft) long. Power is also carried over this cable, allowing devices with moderate power requirements to operate without a separate power supply.

→ FireWire is also available in Cat 5 and optical fiber versions.

→ The 1394 interface is comparable to USB, though USB requires a master controller and has greater market share

→ It was developed in the late 1980s and early 1990s by Apple, which called it FireWire.

→ The copper cable it uses in its most common implementation can be up to 4.5 metres (15 ft) long. Power is also carried over this cable, allowing devices with moderate power requirements to operate without a separate power supply.

→ FireWire is also available in Cat 5 and optical fiber versions.

→ The 1394 interface is comparable to USB, though USB requires a master controller and has greater market share

Question 21 |

What will be the cipher text produced by the following cipher function for the plain text ISRO with key k =7. [Consider ‘A’ = 0, ‘B’ = 1, …….’Z’ = 25].

Ck(M) = (kM + 13) mod 26

Ck(M) = (kM + 13) mod 26

RJCH | |

QIBG | |

GQPM | |

XPIN |

Question 21 Explanation:

Given plain text is: ISRO

key(k)=7

Hashing function:Ck(M) = (kM + 13) mod 26

Alphabets: 'A' = 0,

key(k)=7

Hashing function:Ck(M) = (kM + 13) mod 26

Alphabets: 'A' = 0,

Question 22 |

Any set of boolean operators that is sufficient to represent all boolean expressions is said to be complete. Which of the following is not complete?

{NOT, OR} | |

{NOR} | |

{AND, OR} | |

{AND, NOT} |

Question 22 Explanation:

→We can implement any logical gates by using NOR & NAND gates (Universal gates ).
→We can’t implement universal gates by using only AND and OR gates combination.
→We can implement universal gates (NOT,OR), (NOR) and (AND,NOT) gates combination.

Question 23 |

Which of the following is the highest isolation level in transaction management?

Serializable | |

Repeated Read | |

Committed Read | |

Uncommitted Read |

Question 23 Explanation:

→Transactions specify an isolation level that defines the degree to which one transaction must be isolated from resource or data modifications made by other transactions.

→Isolation levels are described in terms of which concurrency side effects, such as dirty reads or phantom reads, are allowed.

→The highest isolation level, serializable, guarantees that a transaction will retrieve exactly the same data every time it repeats a read operation, but it does this by performing a level of locking that is likely to impact other users in multi-user systems.

→Isolation levels are described in terms of which concurrency side effects, such as dirty reads or phantom reads, are allowed.

→The highest isolation level, serializable, guarantees that a transaction will retrieve exactly the same data every time it repeats a read operation, but it does this by performing a level of locking that is likely to impact other users in multi-user systems.

Question 24 |

Consider the following relational schema:

Suppliers (sid:integer, sname:string, sadress:string)

Parts (pid:integer, pname:string, pcolor:string)

Catalog (sid:integer, pid:integer, pcost:real)

What is the result of the following query?

(SELECT Catalog.pid from Suppliers, Catalog

WHERE Suppliers.sid = Catalog.pid)

MINUS

(SELECT Catalog.pid from Suppliers, Catalog

WHERE Suppliers.sname <> 'sachin' and Suppliers.sid = Catalog.sid)

Suppliers (sid:integer, sname:string, sadress:string)

Parts (pid:integer, pname:string, pcolor:string)

Catalog (sid:integer, pid:integer, pcost:real)

What is the result of the following query?

(SELECT Catalog.pid from Suppliers, Catalog

WHERE Suppliers.sid = Catalog.pid)

MINUS

(SELECT Catalog.pid from Suppliers, Catalog

WHERE Suppliers.sname <> 'sachin' and Suppliers.sid = Catalog.sid)

pid of Parts supplied by all except sachin | |

pid of Parts supplied only by sachin | |

pid of Parts available in catalog supplied by sachin | |

pid of Parts available in catalogs supplied by all except sachin |

Question 24 Explanation:

→SELECT Catalog.pid from Suppliers, Catalog WHERE Suppliers.sid = Catalog.pid
The above query will gives all pids of both Catalog and Supplier .

→SELECT Catalog.pid from Suppliers, Catalog WHERE Suppliers.sname <> 'sachin' and Suppliers.sid = Catalog.sid

*The above query will gives the pids of all parts which are supplied by any other supplier other than Sachin.

→The SQL MINUS operator is used to return all rows in the first SELECT statement that are not returned by the second SELECT statement

→The entire query will get the pids which are supplied by only Sachin.

→SELECT Catalog.pid from Suppliers, Catalog WHERE Suppliers.sname <> 'sachin' and Suppliers.sid = Catalog.sid

*The above query will gives the pids of all parts which are supplied by any other supplier other than Sachin.

→The SQL MINUS operator is used to return all rows in the first SELECT statement that are not returned by the second SELECT statement

→The entire query will get the pids which are supplied by only Sachin.

Question 25 |

Consider the following dependencies and the BOOK table in a relational database design. Determine the normal form of the given relation.

ISBN → Title

ISBN → Publisher

Publisher → Address

ISBN → Title

ISBN → Publisher

Publisher → Address

First Normal Form | |

Second Normal Form | |

Third Normal Form | |

BCNF |

Question 25 Explanation:

→All attributes in the given functional dependencies are atomic values So it is FIrst normal form.

→In order to check whether it is in Second normal form or not,fist we need to find the candidate key.

→After finding closure of attribute of ISBN from the above dependencies,the candidate key is ISBN.

→A relation is in 2NF if it is in 1NF and every non-prime attribute of the relation is dependent on the whole of every candidate key.

→The given dependencies satisfies second normal form rules as as non prime attribute of the relation is dependent on the whole of every candidate key.

→So the above dependencies are in Second normal form.

→In order to check whether it is in Second normal form or not,fist we need to find the candidate key.

→After finding closure of attribute of ISBN from the above dependencies,the candidate key is ISBN.

→A relation is in 2NF if it is in 1NF and every non-prime attribute of the relation is dependent on the whole of every candidate key.

→The given dependencies satisfies second normal form rules as as non prime attribute of the relation is dependent on the whole of every candidate key.

→So the above dependencies are in Second normal form.

Question 26 |

Calculate the order of leaf(p

_{leaf}) and non leaf(p) nodes of a B+ tree based on the information given below Search key field = 12 bytes Record pointer = 10 bytes Block pointer = 8 bytes Block size = 1 KBp _{leaf} = 51 & p = 46 | |

p _{leaf}= 47 & p = 52 | |

p _{leaf}= 46 & p = 50 | |

p _{leaf} = 52 & p = 47 |

Question 26 Explanation:

In B+ trees the satellite information(record information) is stored in only leaf nodes and not in the non leaf nodes, so no need to include record pointer in the non-leaf nodes.

i) leaf node:

let the order of leaf be 'n'

size of search key field * n + record pointer * n + block pointer <= 1024

12 * n + 10 * n + 8 <= 1024

22n <= 1016

n = 46

ii) for non-leaf node:

size of search key field * n + block pointer * (n+1) <= 1024

12 * n + 8 * n + 8 = 1024

n = 50.8

order of non-leaf node (p) = 50

i) leaf node:

let the order of leaf be 'n'

size of search key field * n + record pointer * n + block pointer <= 1024

12 * n + 10 * n + 8 <= 1024

22n <= 1016

n = 46

ii) for non-leaf node:

size of search key field * n + block pointer * (n+1) <= 1024

12 * n + 8 * n + 8 = 1024

n = 50.8

order of non-leaf node (p) = 50

Question 27 |

The physical location of a record determined by a formula that transforms a file key into a record location is

Hashed file | |

B-Tree file | |

Indexed file | |

Sequential file |

Question 27 Explanation:

Hash File organization method is the one where data is stored at the data blocks whose address is generated by using hash function.

Question 28 |

If a program P calls two subprograms P1 and P2 and P1 can fail 50% of the time and P2 can fail 40% of the time, what is the failure rate of program P

50% | |

60% | |

70% | |

10% |

Question 28 Explanation:

__Method-1__:

Based upon the success rate, we can find the solution.

Success rate=(1-failure rate)

Given failure rates are P1=50% P2=40%

P1 success rate= (1-failure rate)

= (1-0.5)

= 0.5

P2 success rate= (1-failure rate)

= (1-0.4)

= 0.6

Success rate of both P1 and P2 = 0.5 *0.6

= 0.3

Failure rate of both P1 and P2

= 1 - success rate

= 1 - 0.3

= 0.7 (or) 70%

__Method-2__:

Based upon the failure rate we can find the solution.

Program P is divided into two subprograms.

We can calculate total failure rate by considering the two subprograms

P(P1 U P2)= P1+P2-(P1*P2) /*Check note point */

= (50/100)+(40/100)-(50*40)/100

=90-20

=70%

Note: Failure of P1 + Failure of P2 - (Failure of P1 ∩ Failure of P2)

Question 29 |

How many programmable fuses are required in a PLA which takes 16 inputs and gives 8 outputs? It has to use 8 OR gates and 32 AND gates.

1032 | |

776 | |

1284 | |

1536 |

Question 29 Explanation:

A programmable logic array (PLA) is a kind of programmable logic device used to implement combinational logic circuits. The PLA has a set of programmable AND gate planes, which link to a set of programmable OR gate planes, which can then be conditionally complemented to produce an output. It has 2

Total programmable fuses= fuses required by AND gates + fuses required by OR gates

Fuses required by AND gates = 2* no. of inputs * no. of and gates = 2*16*32= 1024 fuses

Fuses required by OR gates = no. Of outputs * no. Of and gates = 8* 32 = 256

Total fuses = 1024+ 256= 1280

^{N}AND Gates for N input variables, and for M outputs from PLA, there should be M OR Gates, each with programmable inputs from all of the AND gates.Total programmable fuses= fuses required by AND gates + fuses required by OR gates

Fuses required by AND gates = 2* no. of inputs * no. of and gates = 2*16*32= 1024 fuses

Fuses required by OR gates = no. Of outputs * no. Of and gates = 8* 32 = 256

Total fuses = 1024+ 256= 1280

Question 30 |

In a three stage counter, using RS flip flops what will be the value of the counter after giving 9 pulses to its input? Assume that the value of counter before giving any pulses is 1.

1 | |

2 | |

9 | |

10 |

Question 30 Explanation:

→In RS Flip flops, Three bits are used in a three stage counter

→The total number of values are 8 (2

→The initial value of counter is 1 So the counter will return to initial stage after 8 pulses.

→At Eight stage, again the counter value is 1

→At Ninth stage, the counter value is 2.

→The total number of values are 8 (2

^{3})→The initial value of counter is 1 So the counter will return to initial stage after 8 pulses.

→At Eight stage, again the counter value is 1

→At Ninth stage, the counter value is 2.

Question 31 |

In which of the following shading models of polygons, the interpolation of intensity values is done along the scan line?

Gourard shading | |

Phong shading | |

Constant shading | |

Flat shading |

Question 31 Explanation:

→Gouraud shading is an interpolation method used in computer graphics to produce continuous shading of surfaces represented by polygon meshes.

→In practice, Gouraud shading is most often used to achieve continuous lighting on triangle surfaces by computing the lighting at the corners of each triangle and linearly interpolating the resulting colours for each pixel covered by the triangle.

→Phong shading refers to an interpolation technique for surface shading in 3D computer graphics.

→'Constant shading','faceted shading' or 'flat shading' is the approach applies an illumination model once to determine a single intensity value that is then used to shade an entire polygon, and holding the value across the polygon to reconstruct the polygon's shade.

→In practice, Gouraud shading is most often used to achieve continuous lighting on triangle surfaces by computing the lighting at the corners of each triangle and linearly interpolating the resulting colours for each pixel covered by the triangle.

→Phong shading refers to an interpolation technique for surface shading in 3D computer graphics.

→'Constant shading','faceted shading' or 'flat shading' is the approach applies an illumination model once to determine a single intensity value that is then used to shade an entire polygon, and holding the value across the polygon to reconstruct the polygon's shade.

Question 32 |

Which of the following number of nodes can form a full binary tree?

8 | |

15 | |

14 | |

13 |

Question 32 Explanation:

A full binary tree is a tree in which every node other than the leaves has two children.
In short, a full binary tree with N leaves contains 2N - 1 nodes.

Question 33 |

In 8086, the jump condition for the instruction JNBE is?

CF = 0 or ZF = 0 | |

ZF = 0 and SF = 1 | |

CF = 0 and ZF = 0 | |

CF = 0 |

Question 33 Explanation:

→JA/JNBE :Jump if above/ Jump if not below or equal

→Description: Jumps to the destination label mentioned in the instruction if the result of previous instruction (generally compare) causes both CF and ZF to have value equal to 0, else no action is taken.

→Description: Jumps to the destination label mentioned in the instruction if the result of previous instruction (generally compare) causes both CF and ZF to have value equal to 0, else no action is taken.

Question 34 |

Which of the following testing methods uses fault simulation technique?

unit testing | |

beta testing | |

stress testing | |

mutation testing |

Question 34 Explanation:

Mutation testing is used to design new software tests and evaluate the quality of existing software tests.

The purpose of mutation testing is to evaluate the effectiveness of the test cases to detect errors in the event of modification or changes in the program code

The purpose of mutation testing is to evaluate the effectiveness of the test cases to detect errors in the event of modification or changes in the program code

Question 35 |

In 8085 microprocessor, the ISR for handling trap interrupt is at which location?

3CH | |

34H | |

74H | |

24H |

Question 35 Explanation:

→A small program or a routine that when executed services the corresponding interrupting source is called as an Interrupt Service Routine(ISR).

→TRAP is a non-maskable interrupt, having the highest priority among all interrupts.

→By default, it is enabled until it gets acknowledged.

→In case of failure, it executes as ISR and sends the data to backup memory.

→This interrupt transfers the control to the location 0024H.

→TRAP is a non-maskable interrupt, having the highest priority among all interrupts.

→By default, it is enabled until it gets acknowledged.

→In case of failure, it executes as ISR and sends the data to backup memory.

→This interrupt transfers the control to the location 0024H.

Question 36 |

The voltage ranges for a logic high and a logic low in RS-232 C standard is

Low is 0.0V to 1.8V, High is 2.0V to 5.0V | |

Low is -15.0V to -3.0V, High is 3.0V to 15.0V | |

Low is 3.0V to 15.0V, High is -3.0V to -15.0V | |

Low is 2.0V to 5.0V, High is 0.0V to 1.8V |

Question 36 Explanation:

According to the RS-232 standard, valid signals are either in the range of +3 volts to +15 volts or -3 volts to -15 volts with respect to the ground/common pin. Consequently, the range between -3 volts and +3 volts is not a valid RS-232 signal level.

The standard also specifies a maximum open-circuit voltage of 25 volts, which means that RS-232 drivers and receivers must be able to withstand any voltage level up to +/-25 volts.

The standard also specifies a maximum open-circuit voltage of 25 volts, which means that RS-232 drivers and receivers must be able to withstand any voltage level up to +/-25 volts.

Question 37 |

In the Ethernet, which field is actually added at the physical layer and is not part of the frame

preamble | |

CRC | |

address | |

location |

Question 37 Explanation:

Preamble belongs to the physical layer and are added at the physical layer only.

CRC- A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.

CRC- A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.

Question 38 |

Ethernet layer-2 switch is a network element type which gives

different collision domain and same broadcast domain | |

different collision domain and different broadcast domain | |

same collision domain and same broadcast domain | |

same collision domain and different broadcast domain |

Question 38 Explanation:

→ A network switch is a multiport network bridge that uses hardware addresses to process and forward data at the data link layer (layer 2) of the OSI model.

→ Switches for Ethernet are the most common form of network switch.

→ An Ethernet switch operates at the data link layer (layer 2) of the OSI model to create a separate collision domain for each switch port. Each device connected to a switch port can transfer data to any of the other ports at any time and the transmissions will not interfere.

→ Because broadcasts are still being forwarded to all connected devices by the switch, the newly formed network segment continues to be a broadcast domain.

→ Switches for Ethernet are the most common form of network switch.

→ An Ethernet switch operates at the data link layer (layer 2) of the OSI model to create a separate collision domain for each switch port. Each device connected to a switch port can transfer data to any of the other ports at any time and the transmissions will not interfere.

→ Because broadcasts are still being forwarded to all connected devices by the switch, the newly formed network segment continues to be a broadcast domain.

Question 39 |

If the frame to be transmitted is 1101011011 and the CRC polynomial to be used for generating checksum is x4+ x + 1, then what is the transmitted frame?

11010110111011 | |

11010110111101 | |

11010110111110 | |

11010110111001 |

Question 39 Explanation:

→A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.

→Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents.

→CRCs can be used for error correction

→Given checksum is x

Step-1:

Given Data unit = 1101011011, Divisor = 10011,

The input is 11010110110000

Step-2:

→Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents.

→CRCs can be used for error correction

→Given checksum is x

^{4}+ x + 1 so four zeros will append at the end.Step-1:

Given Data unit = 1101011011, Divisor = 10011,

The input is 11010110110000

Step-2:

Question 40 |

What will be the efficiency of a Stop and Wait protocol, if the transmission time for a frame is 20ns and the propagation time is 30ns?

20% | |

25% | |

40% | |

66% |

Question 40 Explanation:

→Assuming that the transmission time for the acknowledgement and the processing time at nodes are negligible.

→The time taken by a sender to send a single packet is equal to transmission time (data) + 2 * propagation delay , out of which only transmission time is useful .

→Then, efficiency =transmission time / transmission time + 2 * propagation delay.

→Given data is transmission time is 20ns

→Propagation delay(time) is 30ns.

→Efficiency =20+(20+2*30)=20/80=0.25 which is equivalent to 25%

→The time taken by a sender to send a single packet is equal to transmission time (data) + 2 * propagation delay , out of which only transmission time is useful .

→Then, efficiency =transmission time / transmission time + 2 * propagation delay.

→Given data is transmission time is 20ns

→Propagation delay(time) is 30ns.

→Efficiency =20+(20+2*30)=20/80=0.25 which is equivalent to 25%

Question 41 |

IPv6 does not support which of the following addressing modes?

unicast addressing | |

multicast addressing | |

broadcast addressing | |

anycast addressing |

Question 41 Explanation:

The mechanism by which the address is hosted on the network is referred as addressing mode.

IPv6 does not implement traditional IP broadcast, i.e. the transmission of a packet to all hosts on the attached link using a special broadcast address, and therefore does not define broadcast addresses.

In IPv6, the broadcast addressing t is achieved by sending a packet to the link-local all nodes multicast group at address ff02::1, which is analogous to IPv4 multicasting to address 224.0.0.1.

IPv6 supports the Unicast addressing ,Multicast addressing and Anycast addressing addressing modes:

IPv6 does not implement traditional IP broadcast, i.e. the transmission of a packet to all hosts on the attached link using a special broadcast address, and therefore does not define broadcast addresses.

In IPv6, the broadcast addressing t is achieved by sending a packet to the link-local all nodes multicast group at address ff02::1, which is analogous to IPv4 multicasting to address 224.0.0.1.

IPv6 supports the Unicast addressing ,Multicast addressing and Anycast addressing addressing modes:

Question 42 |

What is IP class and number of sub-networks if the subnet mask is 255.224.0.0?

Class A, 3 | |

Class A, 8 | |

Class B, 3 | |

Class B, 32 |

Question 42 Explanation:

The binary number equivalent to 255 is 1111 1111

The binary number equivalent to 224 is 1110 0000

We can write the subnet mask 255.224.0.0 in binary form as follows

11111111.11100000.00000000.00000000

In the binary representation, the first eight bits represent Class A network address and next three bits( ones) used for represent the number of subnets.

Then the total number of subnets are 2

The binary number equivalent to 224 is 1110 0000

We can write the subnet mask 255.224.0.0 in binary form as follows

11111111.11100000.00000000.00000000

In the binary representation, the first eight bits represent Class A network address and next three bits( ones) used for represent the number of subnets.

Then the total number of subnets are 2

^{3}=8.Question 43 |

Which algorithm is used to shape the bursty traffic into a fixed rate traffic by averaging the data rate?

solid bucket algorithm | |

spanning tree algorithm | |

hocken helm algorithm | |

leaky bucket algorithm |

Question 43 Explanation:

The leaky bucket algorithm is a method of temporarily storing a variable number of requests and organizing them into a set-rate output of packets in an asynchronous transfer mode (ATM) network.

The leaky bucket is used to implement traffic policing and traffic shaping in Ethernet and cellular data networks.

The algorithm can also be used to control metered-bandwidth Internet connections to prevent going over the allotted bandwidth for a month, thereby avoiding extra charges.

The leaky bucket is used to implement traffic policing and traffic shaping in Ethernet and cellular data networks.

The algorithm can also be used to control metered-bandwidth Internet connections to prevent going over the allotted bandwidth for a month, thereby avoiding extra charges.

Question 44 |

A packet filtering firewall can

deny certain users from accessing a service | |

block worms and viruses from entering the network | |

disallow some files from being accessed through FTP | |

block some hosts from accessing the network |

Question 44 Explanation:

Packet-filtering firewalls operate at the network layer (Layer 3) of the OSI model. Packet-filtering firewalls make processing decisions based on network addresses, ports, or protocols.

Packet filtering is a network security mechanism that works by controlling what data can flow to and from a network

A packet filtering firewall can block some hosts from accessing the network.

Packet filtering is a network security mechanism that works by controlling what data can flow to and from a network

A packet filtering firewall can block some hosts from accessing the network.

Question 45 |

Which of the following encryption algorithms is based on the Feistel structure?

Advanced Encryption Standard | |

RSA public key cryptographic algorithm | |

Data Encryption Standard | |

RC4 |

Question 45 Explanation:

A Feistel cipher is a symmetric structure used in the construction of block ciphers.

A large proportion of block ciphers use the scheme, including the Data Encryption Standard (DES).

The Feistel structure has the advantage that encryption and decryption operations are very similar, even identical in some cases, requiring only a reversal of the key scheduled.

A Feistel network(structure) is an iterated cipher with an internal function called a round function.

A large proportion of block ciphers use the scheme, including the Data Encryption Standard (DES).

The Feistel structure has the advantage that encryption and decryption operations are very similar, even identical in some cases, requiring only a reversal of the key scheduled.

A Feistel network(structure) is an iterated cipher with an internal function called a round function.

Question 46 |

The protocol data unit for the transport layer in the internet stack is

segment | |

message | |

datagram | |

frame |

Question 46 Explanation:

A protocol data unit (PDU) is a single unit of information transmitted among peer entities of a computer network.

A PDU is composed of protocol specific control information and user data

Protocol data units for the Internet protocol suite are:

The transport layer PDU is the TCP segment for

→TCP, and the datagram for UDP.

→The Internet layer PDU is the packet.

→The link layer PDU is the frame.

A PDU is composed of protocol specific control information and user data

Protocol data units for the Internet protocol suite are:

The transport layer PDU is the TCP segment for

→TCP, and the datagram for UDP.

→The Internet layer PDU is the packet.

→The link layer PDU is the frame.

Question 47 |

The Gauss-Seidel iterative method can be used to solve which of the following sets?

Linear algebraic equations | |

Linear and nonlinear algebraic equations | |

Linear differential equations | |

Linear and nonlinear differential equations |

Question 47 Explanation:

The Gauss–Seidel method, is an iterative method used to solve a linear system of equations.

The Gauss–Seidel method is an iterative technique for solving a square system of n linear equations with unknown x: Ax=b

The Gauss–Seidel method is an iterative technique for solving a square system of n linear equations with unknown x: Ax=b

Question 48 |

What is the least value of the function f(x) = 2x

^{2}– 8x – 3 in the interval [ 0 , 5] ?-15 | |

7 | |

-11 | |

-3 |

Question 48 Explanation:

One method is trial and error method

Substitute all the value of x from 0 to 5

The value of f(x) is -3 when x=0

The value of f(x) is -9 when x=1

The value of f(x) is -11 when x=2

The value of f(x) is -9 when x=3

The value of f(x) is -3 when x=4

The value of f(x) is -7 when x=5

so the least value is -11

Second method:

→We can solve this one by using derivatives.

→Given function is f(x) = 2x

→ f'(x)=4x-8 (first derivative)

a f''(x)=4 (Second derivative)

Here we got constant value which means that it has minimal value at the point x=2

So we can find the minimum value by substituting value 2 in place of “x” in the given function.

Minimum value is 2⨉(2)

Substitute all the value of x from 0 to 5

The value of f(x) is -3 when x=0

The value of f(x) is -9 when x=1

The value of f(x) is -11 when x=2

The value of f(x) is -9 when x=3

The value of f(x) is -3 when x=4

The value of f(x) is -7 when x=5

so the least value is -11

Second method:

→We can solve this one by using derivatives.

→Given function is f(x) = 2x

^{2}-8x -3→ f'(x)=4x-8 (first derivative)

a f''(x)=4 (Second derivative)

Here we got constant value which means that it has minimal value at the point x=2

So we can find the minimum value by substituting value 2 in place of “x” in the given function.

Minimum value is 2⨉(2)

^{2}-8⨉(2) -3= -11Question 49 |

Consider the following set of processes, with arrival times and the required CPU-burst times given in milliseconds.

What is the sequence in which the processes are completed? Assume round robin scheduling with a time quantum of 2 milliseconds

What is the sequence in which the processes are completed? Assume round robin scheduling with a time quantum of 2 milliseconds

P1, P2, P3 | |

P2, P1, P3 | |

P3, P2, P1 | |

P2, P3, P1 |

Question 49 Explanation:

Given scheduling algorithm is round robin algorithm .

To schedule processes fairly, a round-robin scheduler generally employs time-sharing, giving each job a time slot or quantum(its allowance of CPU time), and interrupting the job if it is not completed by then. The job is resumed next time a time slot is assigned to that process. If the process terminates or changes its state to waiting during its attributed time quantum, the scheduler selects the first process in the ready queue to execute.

Given time quantity is 2ms which means each process will execute 2ms and switches to next process.

This procedure will continue till completion of all processes execution.

From the given data P1 burst time 4 ms and P2 is 2 and P3 is 1.

So first P1 and P2 , P2 will complete first.

After completion of P2 . there are two processes in the queue. From the two processes P1 entered in the queue first and later P3

So P1 will complete next and finally P3

The order of completion of processes are P2,P1 and P3

To schedule processes fairly, a round-robin scheduler generally employs time-sharing, giving each job a time slot or quantum(its allowance of CPU time), and interrupting the job if it is not completed by then. The job is resumed next time a time slot is assigned to that process. If the process terminates or changes its state to waiting during its attributed time quantum, the scheduler selects the first process in the ready queue to execute.

Given time quantity is 2ms which means each process will execute 2ms and switches to next process.

This procedure will continue till completion of all processes execution.

From the given data P1 burst time 4 ms and P2 is 2 and P3 is 1.

So first P1 and P2 , P2 will complete first.

After completion of P2 . there are two processes in the queue. From the two processes P1 entered in the queue first and later P3

So P1 will complete next and finally P3

The order of completion of processes are P2,P1 and P3

Question 50 |

In case of a DVD, the speed of data transfer is mentioned in multiples of?

150 KB/s | |

1.38 MB/s | |

300 KB/s | |

2.40 MB/s |

Question 50 Explanation:

The speed of writing a DVD at 1X (1,385,000 bytes per second).

Question 51 |

Suppose we have variable logical records of lengths of 5 bytes, 10 bytes, and 25 bytes while the physical block size in disk is 15 bytes. What is the maximum and minimum fragmentation seen in bytes?

25 and 5 | |

15 and 5 | |

15 and 0 | |

10 and 5 |

Question 51 Explanation:

The maximum fragmentation that is observed is in the case of record length of 25 bytes and it is of 10 bytes. This is explained as follows. Suppose we have a logical record of 25 bytes. Then, since the physical block length is only 15 bytes so we will require 2 physical blocks to store data. One block will be fully occupied and for the second block only 15 bytes will be used, resulting in unused 10 bytes.

Physical block length is 15 bytes. In case of 10 bytes record, the unused space is 5 bytes. The minimum fragmentation that is observed in this case is 5 bytes for the record length of 10 bytes

Physical block length is 15 bytes. In case of 10 bytes record, the unused space is 5 bytes. The minimum fragmentation that is observed in this case is 5 bytes for the record length of 10 bytes

Question 52 |

A CPU scheduling algorithm determines an order for the execution of its scheduled processes. Given ‘n’ processes to be scheduled on one processor, how many possible different schedules are there?

n | |

n ^{2} | |

n! | |

2 ^{n} |

Question 52 Explanation:

For ‘n’ processes to be scheduled on one processor, there can be n! different schedules possible.

If you are making choices from n objects, then on your first pick you have n choices. On your second pick, you have n-1 choices, n-2 for your third choice and so forth.

For example 5 processes, the number of ways to schedules is 5!

If you are making choices from n objects, then on your first pick you have n choices. On your second pick, you have n-1 choices, n-2 for your third choice and so forth.

For example 5 processes, the number of ways to schedules is 5!

Question 53 |

Which of the following are the likely causes of thrashing?

Page size was very small | |

There are too many programs running in the system | |

Least recently used policy is used for page replacement | |

First in First out policy is used for page replacement |

Question 53 Explanation:

If a process is given too few frames,its faulting rate will rise dramatically.
If this occurs for many or all the processes, the resulting situation in which the system is doing very little useful work due to the high I/O requirements for all the page faults is called thrashing.

Question 54 |

Consider a logical address space of 8 pages of 1024 words each, mapped onto a physical memory of 32 frames. How many bits are there in the physical address and logical address respectively?

5, 3 | |

10, 10 | |

15, 13 | |

15, 15 |

Question 54 Explanation:

→Number of pages= 8= 2

→Each page consists of 1024 words =2

→Logical address space consists of 8 pages of 1024 words each,

→Then the number of bits required for logical address is 3+10=13 bits.

→Total number of frames =32=2

→The logical memory is mapped to physical memory which means mapping should done between pages and frames.

→Physical address = 5(number of bits for frames) + 10 (number of bits for pages)= 15 bits

^{3}=(3 bits)→Each page consists of 1024 words =2

^{10}(10 bits)→Logical address space consists of 8 pages of 1024 words each,

→Then the number of bits required for logical address is 3+10=13 bits.

→Total number of frames =32=2

^{5}(5 bits).→The logical memory is mapped to physical memory which means mapping should done between pages and frames.

→Physical address = 5(number of bits for frames) + 10 (number of bits for pages)= 15 bits

Question 55 |

In a 64-bit machine, with 2 GB RAM, and 8 KB page size, how many entries will be there in the page table if it is inverted?

2 ^{18} | |

2 ^{20} | |

2 ^{33} | |

2 ^{51} |

Question 55 Explanation:

Given data is

Memory size = 2 GB = 2

Page size = 8 KB = 2

Number of entries in inverted page table = physical address space / page size = 2

Memory size = 2 GB = 2

^{31}Page size = 8 KB = 2

^{13}Number of entries in inverted page table = physical address space / page size = 2

^{31}/2^{13}= 2^{18}Question 56 |

Which of the following is not a necessary condition for deadlock?

Mutual exclusion | |

Reentrancy | |

Hold and wait | |

No pre-emption |

Question 56 Explanation:

Four Necessary and Sufficient Conditions for Deadlock are:

→Mutual exclusion

The resources involved must be unshareable; otherwise, the processes would not be prevented from using the resource when necessary.

→Hold and wait or partial allocation

The processes must hold the resources they have already been allocated while waiting for other (requested) resources. If the process had to release its resources when a new resource or resources were requested, deadlock could not occur because the process would not prevent others from using resources that it controlled.

→No pre-emption

The processes must not have resources taken away while that resource is being used. Otherwise, deadlock could not occur since the operating system could simply take enough resources from running processes to enable any process to finish.

→Resource waiting or circular wait

A circular chain of processes, with each process holding resources which are currently being requested by the next process in the chain, cannot exist. If it does, the cycle theorem (which states that "a cycle in the resource graph is necessary for deadlock to occur") indicated that deadlock would occur

→Mutual exclusion

The resources involved must be unshareable; otherwise, the processes would not be prevented from using the resource when necessary.

→Hold and wait or partial allocation

The processes must hold the resources they have already been allocated while waiting for other (requested) resources. If the process had to release its resources when a new resource or resources were requested, deadlock could not occur because the process would not prevent others from using resources that it controlled.

→No pre-emption

The processes must not have resources taken away while that resource is being used. Otherwise, deadlock could not occur since the operating system could simply take enough resources from running processes to enable any process to finish.

→Resource waiting or circular wait

A circular chain of processes, with each process holding resources which are currently being requested by the next process in the chain, cannot exist. If it does, the cycle theorem (which states that "a cycle in the resource graph is necessary for deadlock to occur") indicated that deadlock would occur

Question 57 |

Consider the following process and resource requirement of each process.

Predict the state of this system, assuming that there are a total of 5 instances of resource type 1 and 4 instances of resource type 2.

Can go to safe or unsafe state based on sequence | |

Safe state | |

Unsafe state | |

Deadlock state |

Question 57 Explanation:

Question 58 |

A starvation free job scheduling policy guarantees that no job indefinitely waits for a service. Which of the following job scheduling policies is starvation free?

Priority queuing | |

Shortest Job First | |

Youngest Job First | |

Round robin |

Question 58 Explanation:

Starvation is nothing but the indefinite postponement of a process because it requires some resource before it can run, but the resource, though available for allocation,is never allocated to this process

Round Robin is a starvation free scheduling algorithm because the process will execute up to quantum value and switches to next process.

In the round robin algorithm, All processes will execute for a given time quantum value.so indefinite postponement of process is not possible.

Round Robin is a starvation free scheduling algorithm because the process will execute up to quantum value and switches to next process.

In the round robin algorithm, All processes will execute for a given time quantum value.so indefinite postponement of process is not possible.

Question 59 |

The state of a process after it encounters an I/O instruction is

ready | |

blocked | |

idle | |

running |

Question 59 Explanation:

According to process state diagram, whenever the process encounter I/O operation , the process enters into waiting or blocked state.

Once I/O operation completed, the process will enter into ready state to execute the process.

Question 60 |

Embedded pointer provides

a secondary access path | |

a physical record key | |

an inverted index | |

a prime key |

Question 60 Explanation:

1. To understand how pointers and their associated data elements are allocated in Microsoft RPC, you have to differentiate between top-level pointers and embedded pointers

2. Top-level pointers are those that are specified as the names of parameters in function prototypes. Top-level pointers and their referents are always allocated on the server.

3. Embedded pointers are pointers that are embedded in data structures such as arrays, structures, and unions. When embedded pointers only write output to a buffer and are null on input, the server application can change their values to non-null. In this case, the client stubs allocate new memory for this data.

4.If the embedded pointer is not null on the client before the call, the stubs do not allocate memory on the client on return. Instead, the stubs attempt to write the memory associated with the embedded pointer into the existing memory on the client associated with that pointer, overwriting the data already there.

2. Top-level pointers are those that are specified as the names of parameters in function prototypes. Top-level pointers and their referents are always allocated on the server.

3. Embedded pointers are pointers that are embedded in data structures such as arrays, structures, and unions. When embedded pointers only write output to a buffer and are null on input, the server application can change their values to non-null. In this case, the client stubs allocate new memory for this data.

4.If the embedded pointer is not null on the client before the call, the stubs do not allocate memory on the client on return. Instead, the stubs attempt to write the memory associated with the embedded pointer into the existing memory on the client associated with that pointer, overwriting the data already there.

Question 61 |

A particular parallel program computation requires 100 seconds when executed on a single CPU. If 20% of this computation is strictly sequential, then theoretically the best possible elapsed times for this program running on 2 CPUs and 4 CPUs respectively are

55 and 45 seconds | |

80 and 20 seconds | |

75 and 25 seconds | |

60 and 40 seconds |

Question 61 Explanation:

→From the given data, one CPU will require 100 seconds to complete given task.

→20% of computation is done by sequential which means 20% of 100 seconds (20 seconds)

→Remaining computation 80% of work(80 seconds) can be done by the parallel processing.

→2 Processors: 20 % of sequential work is done by processor p1 (20 sec) and remaining 80 % of work (80 seconds) can be distributed among p1 and p2 equally(each process will get 40 sec). so time required = 20 + 40 = 60 seconds

→4 Processors: 20 % of work is done by any of the processor sequentially(20 seconds) and remaining 80 % of work (80 seconds) can be divided among 4 processors(each process will get 20 sec), so maximum time required = 20 + 20 = 40 seconds

→20% of computation is done by sequential which means 20% of 100 seconds (20 seconds)

→Remaining computation 80% of work(80 seconds) can be done by the parallel processing.

→2 Processors: 20 % of sequential work is done by processor p1 (20 sec) and remaining 80 % of work (80 seconds) can be distributed among p1 and p2 equally(each process will get 40 sec). so time required = 20 + 40 = 60 seconds

→4 Processors: 20 % of work is done by any of the processor sequentially(20 seconds) and remaining 80 % of work (80 seconds) can be divided among 4 processors(each process will get 20 sec), so maximum time required = 20 + 20 = 40 seconds

Question 62 |

Consider the following C code.

#include

#include

void main()

{

double pi = 3.1415926535;

int a = 1;

int i;

for(i=0; i < 3; i++)

if(a = cos(pi * i/2) )

printf("%d ",1);

else printf("%d ", 0);

}

What would the program print?

#include

#include

void main()

{

double pi = 3.1415926535;

int a = 1;

int i;

for(i=0; i < 3; i++)

if(a = cos(pi * i/2) )

printf("%d ",1);

else printf("%d ", 0);

}

What would the program print?

000 | |

010 | |

101 | |

111 |

Question 62 Explanation:

→The for loop will execute three times for a given i values 0,1,2.

→For a given i = 0:

a = cos(pi * 0/2) [ PI*0 is 0]

a = cos(0) = 1, if condition true and it will print 1

→For a given i = 1

a = cos (pi/2) [pi*1 is pi]

a=cos(1.57075) whose value approximately equal to zero

a = 0, Here the condition is false then else part will execute and it will print 0

→For i = 2

a = cos(pi) [pi*2/2 is nothing but pi]

a = -1, ,Here also condition is true and it will execute if part and it will print “1”

→Finally it will print 101.

→For a given i = 0:

a = cos(pi * 0/2) [ PI*0 is 0]

a = cos(0) = 1, if condition true and it will print 1

→For a given i = 1

a = cos (pi/2) [pi*1 is pi]

a=cos(1.57075) whose value approximately equal to zero

a = 0, Here the condition is false then else part will execute and it will print 0

→For i = 2

a = cos(pi) [pi*2/2 is nothing but pi]

a = -1, ,Here also condition is true and it will execute if part and it will print “1”

→Finally it will print 101.

Question 63 |

What is the output of the following Java program?

Class Test

{

public static void main (String [] args)

{

int x = 0;

int y = 0;

for (int z = 0; z < 5; z++)

{

if((++x > 2) || (++y > 2))

{

x++;

}

}

System.out.println( x + " " + y);

}

}

Class Test

{

public static void main (String [] args)

{

int x = 0;

int y = 0;

for (int z = 0; z < 5; z++)

{

if((++x > 2) || (++y > 2))

{

x++;

}

}

System.out.println( x + " " + y);

}

}

8 2 | |

8 5 | |

8 3 | |

5 3 |

Question 63 Explanation:

Initial values of x and y is 0

For the given code, the loop will execute 5 times.

Step-1: For z = 0,

The following condition will execute

if((++x > 2) || (++y > 2))

Here pre-increment operation will be performed on x and y. Then x and y values are 1 and the condition false

Similar operation will be performed for z values 1,2,3 and 4

Step-2: For z = 1, Then x and y values become 2 and the condition false.

Step-3: For z = 2, “||” operator is present in the expression, if first operand is true then no need to check the second operand.x value is 3, if condition true and ++y is not evaluated,again “x” value is incremented then x value is “4”.

Perform the step-3 procedure for z value 3 and 4 . Here x value is incremented “4” times. Then the final value of “x” is 8 and “y” is 2.

For the given code, the loop will execute 5 times.

Step-1: For z = 0,

The following condition will execute

if((++x > 2) || (++y > 2))

Here pre-increment operation will be performed on x and y. Then x and y values are 1 and the condition false

Similar operation will be performed for z values 1,2,3 and 4

Step-2: For z = 1, Then x and y values become 2 and the condition false.

Step-3: For z = 2, “||” operator is present in the expression, if first operand is true then no need to check the second operand.x value is 3, if condition true and ++y is not evaluated,again “x” value is incremented then x value is “4”.

Perform the step-3 procedure for z value 3 and 4 . Here x value is incremented “4” times. Then the final value of “x” is 8 and “y” is 2.

Question 64 |

Consider the list of page references in the timeline as below:

9 6 2 3 4 4 4 4 3 4 4 2 5 8 6 8 5 5 3 2 3 3 9 6 2 7

What is the working set at the penultimate page reference if ∆ is 5?

{8,5,3,2,9,6} | |

{4,3,6,2,5} | |

{3,9,6,2,7} | |

{3,9,6,2,7} |

Question 64 Explanation:

Penultimate means in second last working set model.

The set of pages that a process is currently using is called its working set. If the entire working set is in memory, the process will run without causing many faults until it moves into another execution phase (e.g., the next pass of the compiler).

Many paging systems try to keep track of each process' working set and make sure that it is in memory before letting the process run. This approach is called the working set model.. It is designed to greatly reduce the page fault rate.

Working sets are as below:

9 - {9}

6 - {9,6}

2 - {9,6,2}

3 - {9,6,2,3}

4 - {9,6,2,3,4}

4 - {6,2,3,4}

4 - {2,3,4}

4 - {3,4}

3 - {3,4}

4 - {3,4}

4 - {3,4}

2 - {3,4,2}

5 - {3,4,2,5}

8 - {2,4,5,8}

6 - {2,4,5,8,6}

8 - {2,5,8,6}

5 - {5,8,6}

5 - {5,8,6}

3 - {3,5,8,6}

2 - {2,3,5,8}

3 - {2,3,5}

9 - {2,3,9}

6 - {2,3,9,6}

2 - {3,9,6,2}

7 - {3,9,6,2,7}

The set of pages that a process is currently using is called its working set. If the entire working set is in memory, the process will run without causing many faults until it moves into another execution phase (e.g., the next pass of the compiler).

Many paging systems try to keep track of each process' working set and make sure that it is in memory before letting the process run. This approach is called the working set model.. It is designed to greatly reduce the page fault rate.

Working sets are as below:

9 - {9}

6 - {9,6}

2 - {9,6,2}

3 - {9,6,2,3}

4 - {9,6,2,3,4}

4 - {6,2,3,4}

4 - {2,3,4}

4 - {3,4}

3 - {3,4}

4 - {3,4}

4 - {3,4}

2 - {3,4,2}

5 - {3,4,2,5}

8 - {2,4,5,8}

6 - {2,4,5,8,6}

8 - {2,5,8,6}

5 - {5,8,6}

5 - {5,8,6}

3 - {3,5,8,6}

2 - {2,3,5,8}

3 - {2,3,5}

9 - {2,3,9}

6 - {2,3,9,6}

2 - {3,9,6,2}

7 - {3,9,6,2,7}

Question 65 |

What is the cyclomatic complexity of a module which has seventeen edges and thirteen nodes?

4 | |

5 | |

6 | |

7 |

Question 65 Explanation:

From the given question,

The number of edges are (E)=17

The number of Nodes are (N)=13

We can calculate the cyclomatic complexity of a module by using the formulae E – N + 2

Substitute the given values in the above formulae.

Cyclomatic complexity = 17 – 13 + 2 = 6

The number of edges are (E)=17

The number of Nodes are (N)=13

We can calculate the cyclomatic complexity of a module by using the formulae E – N + 2

Substitute the given values in the above formulae.

Cyclomatic complexity = 17 – 13 + 2 = 6

Question 66 |

Which of the following types of coupling has the weakest coupling?

Pathological coupling | |

Control coupling | |

Data coupling | |

Message coupling |

Question 66 Explanation:

Coupling is the degree of interdependence between software modules; a measure of how closely connected two routines or modules are the strength of the relationships between module

Coupling can be "low" (also "loose" and "weak") or "high" (also "tight" and "strong").

Some types of coupling, in order of highest to lowest coupling, are as follows:

Content coupling (high)

Content coupling is said to occur when one module uses the code of other module, for instance a branch. This violates information hiding - a basic design concept.

Common coupling

Common coupling is said to occur when several modules have access to the same global data. But it can lead to uncontrolled error propagation and unforeseen side-effects when changes are made.

External coupling

External coupling occurs when two modules share an externally imposed data format, communication protocol, or device interface. This is basically related to the communication to external tools and devices.

Control coupling

Control coupling is one module controlling the flow of another, by passing it information on what to do (e.g., passing a what-to-do flag).

Stamp coupling (data-structured coupling)

Stamp coupling occurs when modules share a composite data structure and use only parts of it, possibly different parts

Data coupling

Data coupling occurs when modules share data through, for example, parameters. Each datum is an elementary piece, and these are the only data shared (e.g., passing an integer to a function that computes a square root).

Coupling can be "low" (also "loose" and "weak") or "high" (also "tight" and "strong").

Some types of coupling, in order of highest to lowest coupling, are as follows:

Content coupling (high)

Content coupling is said to occur when one module uses the code of other module, for instance a branch. This violates information hiding - a basic design concept.

Common coupling

Common coupling is said to occur when several modules have access to the same global data. But it can lead to uncontrolled error propagation and unforeseen side-effects when changes are made.

External coupling

External coupling occurs when two modules share an externally imposed data format, communication protocol, or device interface. This is basically related to the communication to external tools and devices.

Control coupling

Control coupling is one module controlling the flow of another, by passing it information on what to do (e.g., passing a what-to-do flag).

Stamp coupling (data-structured coupling)

Stamp coupling occurs when modules share a composite data structure and use only parts of it, possibly different parts

Data coupling

Data coupling occurs when modules share data through, for example, parameters. Each datum is an elementary piece, and these are the only data shared (e.g., passing an integer to a function that computes a square root).

Question 67 |

How many number of times the instruction sequence below will loop before coming out of the loop?

A1: MOV AL, 00H

INC AL

JNZ A1

A1: MOV AL, 00H

INC AL

JNZ A1

1 | |

255 | |

256 | |

Will not come out of the loop |

Question 67 Explanation:

A1: MOV AL, 00H // Storing the value zero into the register AL, Now AL value is 00000000

INC AL // INCREMENT AL register value.

JNZ A1

The JNZ instruction transfers control to the specified address if the value in the accumulator is not 0

Step-1: AL = 0000 0000

Step-2:Next step is for increment the value of AL.

Step-3: Checking the jump condition

The above steps shall repeat until the accumulator value is not equal to zero.

→AL will keep on incrementing and after 255th iteration the value will become 1111 1111

→Again the condition is checked and incremented, now in 256th iteration AL = 1 0000 0000.

→As AL is an 8-bit register, 1 is discarded and the value becomes 0000 0000 and conditional jump to A1 occurs.

→So, total 256 iterations.

INC AL // INCREMENT AL register value.

JNZ A1

The JNZ instruction transfers control to the specified address if the value in the accumulator is not 0

Step-1: AL = 0000 0000

Step-2:Next step is for increment the value of AL.

Step-3: Checking the jump condition

The above steps shall repeat until the accumulator value is not equal to zero.

→AL will keep on incrementing and after 255th iteration the value will become 1111 1111

→Again the condition is checked and incremented, now in 256th iteration AL = 1 0000 0000.

→As AL is an 8-bit register, 1 is discarded and the value becomes 0000 0000 and conditional jump to A1 occurs.

→So, total 256 iterations.

Question 68 |

The most simplified form of the boolean function, X(A,B,C,D) = Σ (7,8,9,10,11,12,13,14,15) (expressed in sum of minterms) is?

A + A’BCD | |

AB + CD | |

A + BCD | |

ABC + D |

Question 68 Explanation:

Following is the solution for the boolean function:

Question 69 |

How many check bits are required for 16 bit data word to detect 2 bit errors and single bit correction using hamming code?

5 | |

6 | |

7 | |

8 |

Question 69 Explanation:

→ We know that error detection and correction using huffman code requires d+1 bits and 2d+1 bits

Question 70 |

Two eight bit bytes 1100 0011 and 0100 1100 are added. What are the values of the overflow, carry and zero flags respectively, if the arithmetic unit of the CPU uses 2’s complement form?

0, 1,1 | |

1, 1,0 | |

1, 0,1 | |

0, 1,0 |

Question 70 Explanation:

Given data,

Question 71 |

How much speed do we gain by using the cache, when cache is used 80% of the time? Assume cache is faster than main memory

5.27 | |

2.00 | |

4.16 | |

6.09 |

Question 71 Explanation:

Speed Gain=(Memory Access Time without Cache)/( Memory Access Time with Cache).

Let M is the memory access time and C is the Cache access time.

Then,

Speed Gain= M/ (0.8M +0.2C).

Note: Speed Gain can be computed if we know how faster is the Cache when compared with Memory

Let M is the memory access time and C is the Cache access time.

Then,

Speed Gain= M/ (0.8M +0.2C).

Note: Speed Gain can be computed if we know how faster is the Cache when compared with Memory

Question 72 |

A pipeline P operating at 400 MHz has a speedup factor of 6 and operating at 70% efficiency. How many stages are there in the pipeline?

5 | |

6 | |

8 | |

9 |

Question 72 Explanation:

Given Data,

Speedup factor=6.

efficiency=70%

=0.7

Step-1: Here, we have to find out number of stages.

Efficiency = Speedup factor/ Number of stages

0.7 = 6 / Number of stages

Step-2: Number of stages = 8.56

= 9

Speedup factor=6.

efficiency=70%

=0.7

Step-1: Here, we have to find out number of stages.

Efficiency = Speedup factor/ Number of stages

0.7 = 6 / Number of stages

Step-2: Number of stages = 8.56

= 9

Question 73 |

A processor is fetching instructions at the rate of 1 MIPS. A DMA module is used to transfer characters to RAM from a device transmitting at 9600 bps. How much time will the processor be slowed down due to DMA activity?

9.6 ms | |

4.8 ms | |

2.4 ms | |

1.2 ms |

Question 73 Explanation:

Given data,

A processor is fetching instructions at the rate=1 MIPS.

DMA module transferring characters=9600 bps

Step-1: DMA module transferring characters= 9600/8 bps

= 1200 bps

Step-2: Here, we have to find out slow down in milliseconds.

Slowdown = 1200/10

= 12*1000/10

= 1.2 ms

A processor is fetching instructions at the rate=1 MIPS.

DMA module transferring characters=9600 bps

Step-1: DMA module transferring characters= 9600/8 bps

= 1200 bps

Step-2: Here, we have to find out slow down in milliseconds.

Slowdown = 1200/10

^{6}= 12*1000/10

^{4}ms= 1.2 ms

Question 74 |

If the frame buffer has 8 bits per pixel and 8 bits are allocated for each of the R, G, B components, what would be the size of the lookup table?

24 bytes | |

1024 bytes | |

768 bytes | |

256 bytes |

Question 74 Explanation:

Given data,

Frame buffer =8 bits per pixel

Each component(R,G,B)= 8 bits

Frame buffer =8 bits per pixel

Each component(R,G,B)= 8 bits

Question 75 |

In an array of 2N elements that is both 2-ordered and 3-ordered, what is the maximum number of positions that an element can be from its position if the array were 1-ordered?

1 | |

2 | |

N/2 | |

2N-1 |

Question 75 Explanation:

Given data,

Array=2N elements

Elements are used 2-ordered and 3-ordered

Step-1: If array used 2-ordered, if it contains an element which is at most two positions away from its original position in a sorted array.

Sep-2: Maximum number of positions that an element can be from its position if the array were

1-ordered = 1

Array=2N elements

Elements are used 2-ordered and 3-ordered

Step-1: If array used 2-ordered, if it contains an element which is at most two positions away from its original position in a sorted array.

Sep-2: Maximum number of positions that an element can be from its position if the array were

1-ordered = 1

Question 76 |

Which of the following productions eliminate left recursion in the productions given below:

S → Aa | b

A → Ac | Sd | ε

S → Aa | b

A → Ac | Sd | ε

S → Aa | b A → bdA’ A’ → A’c | A’ba | A | ε | |

S → Aa | b A → A’ | bdA’, A’ → cA’ | adA’ | ε | |

S → Aa | b A → A’c | A’d A’ → bdA’ | cA | ε | |

S → Aa | b A → cA’ | adA’ | bdA’ A’ → A | ε |

Question 76 Explanation:

Question 77 |

Consider the following pseudocode:
x : integer := 1
y : integer := 2
procedure add
x := x + y
procedure second (P: procedure)
x : integer := 2
P()
procedure first
y : integer := 3
second(add)
first()
write_integer (x)
What does it print if the language uses dynamic scoping with deep binding?

2 | |

3 | |

4 | |

5 |

Question 77 Explanation:

Scope rule:

The “current” binding for a given name is the one encountered most recently during execution

Dynamic scoping :

The scope of bindings is determined at run time not at Compile time .

→ For deep binding, the referencing environment is bundled with the subroutine as a closure and passed as an argument. A subroutine closure contains

– A pointer to the subroutine code

– The current set of name-to-object bindings

→ By considering dynamic scoping with deep binding when add is passed into second the environment is x = 1, y = 3 and the x is the global x so it writes 4 into the global x, which is the one picked up by the write_integer.

The “current” binding for a given name is the one encountered most recently during execution

Dynamic scoping :

The scope of bindings is determined at run time not at Compile time .

→ For deep binding, the referencing environment is bundled with the subroutine as a closure and passed as an argument. A subroutine closure contains

– A pointer to the subroutine code

– The current set of name-to-object bindings

→ By considering dynamic scoping with deep binding when add is passed into second the environment is x = 1, y = 3 and the x is the global x so it writes 4 into the global x, which is the one picked up by the write_integer.

Question 78 |

The number of rotations required to insert a sequence of elements 9,6,5,8,7,10 into an empty AVL tree is?

0 | |

1 | |

2 | |

3 |

Question 78 Explanation:

Step-1: Initially, the elements are

Question 79 |

Let A(1:8, -5:5, -10:5) be a three dimensional array. How many elements are there in the array A?

1200 | |

1408 | |

33 | |

1050 |

Question 79 Explanation:

Array declaration in C language is int A[10] which means there are 10 elements in the array.
Similarly int A[10][10] means array consists of the 100 elements.

In the given question, Array is represented with lower bound and upper bound.

The following ARRAY statement defines an array containing a total of five elements, a lower bound of 72, and an upper bound of 76. It represents the calendar years 1972 through 1976: array years{72:76} first second third fourth fifth.

The following ARRAY statement arranges the variables in an array by decades. The rows range from 6 through 9, and the columns range from 0 through 9.

array X{6:9,0:9} X60-X99.

In the given question, Array is represented with lower bound and upper bound.

The following ARRAY statement defines an array containing a total of five elements, a lower bound of 72, and an upper bound of 76. It represents the calendar years 1972 through 1976: array years{72:76} first second third fourth fifth.

The following ARRAY statement arranges the variables in an array by decades. The rows range from 6 through 9, and the columns range from 0 through 9.

array X{6:9,0:9} X60-X99.

There are 79 questions to complete.