Progress over Perfection

# ISRO 2016: Solved Paper for Junior Scientist CS-IT

1. A company needs to develop digital signal processing software for one of its newest inventions. The software is expected to have 20000 lines of code. The company needs to determine the effort in person-months needed to develop this software using the basic COCOMO model. The multiplicative factor for this model is given as 2.2 for the software development on embedded systems, while the exponentiation factor is given as 1.5. What is the estimated effort in person-months?  [From Gate 2010]

a) 196.77

b) 206.56

c) 199.56

d) 210.68

Explanation:
LOC given = 20,000 => KLOC = 20
Effort applied (E) = ab X (KLOC)bb man-months
Where ab (multiplicative factor) given = 2.2
Where bb (exponentiation factor) given = 1.5
So solve, E = 2.2 X (20)1.5 man-months
=> E = 196.77

2.   In the spiral model of software development, the primary determinant in selecting activities in each iteration is  [From GATE IT 2007]

a) Iteration size

b) Cost

c) Adopted process such as Rational Unified Process or Extreme Programming

d) Risk

Explanation: The spiral model is a risk-driven process model generator for software projects. Based on the unique risk patterns of a given project, the spiral model guides a team to adopt elements of one or more process models, such as incremental, waterfall, or evolutionary prototyping.

3. Bit stuffing refers to  [ From ISRO 2007]

a) Inserting a ‘0’ in user stream to differentiate it with a flag

b) Inserting a ‘0’ in flag stream to avoid ambiguity

c) Appending a nibble to the flag sequence

d) Appending a nibble to the user data stream

Explanation: The term “bit stuffing” broadly refers to a technique whereby extra bits are added to a data stream, which do not themselves carry any information, but either assist in management of the communications or deal with other issues. In computer networks, Zero-bit insertion is a particular type of bit stuffing used in some data transmission protocols to aid clock recovery from the data stream.

4. Dynamic routing protocol enable routers to:

a) Dynamically discover and maintain routes

b) Distribute routing updates to other routers

c) Reach agreement with other routers about the network topology

d) All of the above

Explanation: all the options (a), (b), and (c) are basic needs to handle by the dynamic routing protocols.

5. In Ethernet CSMA/CD, the special bit sequence is transmitted by media access management to handle collision is called

a) Preamble

b) Postamble

c) Jam

d) None of these

Explanation: CSMA/CD uses a carrier sensing scheme in which a transmitting data station detects other signals while transmitting a frame, and stops transmitting that frame, transmits a jam signal, and then waits for a random time interval before trying to resend the frame. The jam signal or jamming signal is a signal that carries a 32-bit binary pattern sent by a data station to inform the other stations of the collision and that they must not transmit.

6. Which network protocol Allows hosts to dynamically get a unique IP number on each bootup?

a) DHCP

b) BOOTP

c) RARP

d) ARP

Explanation:

Dynamic Host Configuration Protocol (DHCP) and Bootstrap Protocol (BOOTP), both does allows hosts to dynamically get a unique IP Number. But differ in few things. BOOTP was designed to provide an IP address during the host is booting up while DHCP provide an IP address at any time when a host tries to connecting a server. Reverse ARP (RARP) is used to get IP address corresponding to a MAC address. Address Resolution Protocol (ARP) is used to get MAC address corresponding to an IP address.

7. In a token ring network, the transmission speed is 107 bps and the propagation speed is 200 ms. Then 1 bit delay in this network is equivalent to  [ From GATE CS 2007]

a) 500 m of cable

b) 200 m of cable

c) 20 m of cable

d) 50 m of cable

Explanation:
in 1 second, bits transmit =  107 bps
1 bit takes time to transmit = .10 μs
Propagation speed is = 200 m in 1 μs
So, 1 bit delay in network is =  200 m * .10 μs = 20 m of cable

8. The address of a class B host is to be split into subnets with a 6-bit subnet number. What is the maximum number of subnets and the maximum number of hosts in each subnet? [ From GATE CS 2007]

a) 62 subnets and 262142 hosts

b) 64 subnets and 262142 hosts

c) 62 subnets and 1022 hosts

d) 64 subnets and 1024 hosts

Explanation:

• In class B, first 2 octet are reserved for Network ID and remaining 2 octet for Host ID
• So first 6 bits of 3rd octet are used for subnet and remaining 10 bits for hosts.
• Maximum number of subnets  = 26 – 2 = 62
• Note that 2 is subtracted because subnet values consisting of all zeros and all ones (broadcast).
• And no of hosts = 210 – 2 = 1022
• 2 is subtracted for Number of hosts is also. The address with all bits as 1 is reserved as broadcast address and address with all host id bits as 0 is used as network address of subnet.

9.  The message 11001001 is to be transmitted using the CRC polynomial x3 + 1 to protect it from errors. The message that should be transmitted is  [ From GATE CS 2007 and ISRO 2015]

a) 11001001000

b) 11001001011

c) 11001010

d) 110010010011

Explanation:
In CRC we send a dividend to receiver generated by CRC procedure at sender. Dividend that require to send to receiver = data unit padded by (number of divisor bits -1) remainder bits at sender

Data unit = 1100 1001
Divisor = 1001 because CRC polynomial is x3+1
Remainder = 011
Dividend that require to send to receiver = 1100 1001 011

1100 1001 000 <— data unit’s right side padded by 3 zero bits
1001                 <— divisor
1011              <— result (note that XOR with the divisor done)
1001               <— divisor
1000                <— result
1001               <— divisor
1100                <— result
1001               <— divisor

1010                <— result
1001               <— divisor—————–
0011 <— remainder (3 bits).

Division algorithm stops here as quotient is equal to zero.

10. What is the maximum size of data that application layer can pass on to the TCP layer below?  [ From GATE CS 2008]

a)    Any size

b)   (216 bytes — the size of TCP header)

c)    216 bytes

d)   1500 bytes

Explanation: Application layer can send any size of data. There is no limit defined by standards. The lower layers divides the data if needed.

11. Frames of 1000 bits are sent over a 10^6 bps duplex link between two hosts. The propagation time is 25ms. Frames are to be transmitted into this link to maximally pack them in transit (within the link).
What is the minimum number of bits (i) that will be required to represent the sequence numbers distinctly? Assume that no time gap needs to be given between transmission of two frames.  [ From GATE CS 2009]

a) i=2

b) i=3

c) i=4

d) i=5

Explanation:
per second bits = 106
Number of bits in a frame = 1000
per second frames = 1000000 / 1000 = 1000
per millisecond frames = 1000/1000 = 1
Propagation time = 25 ms
Number of frames to send in 25 ms = 25
Bits need to represent sequence of 25 frames = log225 = 5

12. Which of the following is TRUE only for XML, but not for HTML?  [ From GATE IT 2008]

a) It is derived from SGML

b) It describes content and layout

c) It allows user defined tags

d) It is restricted only to be used with web browsers

Explanation: All given options true for both HTML and XML. Since latest versions of HTML and web browsers we can also use user defined tags in HTML well.

13. Consider a system with 2 level caches. Access times of Level 1 cache, Level_ 2_ cache and main memory are 1 ns, 10 ns, and 500 ns, respectively. The hit rates of Level 1 and Level 2 caches are 0.8 and 0.9, respectively. What is the average access time of the system ignoring the search time within the cache? [ From GATE IT 2004]

(a) 13.0 ns

(b) 12.8 ns

(c) 12.6 ns

(d) 12.4 ns

Explanation: Formula to calculate avg access time:

= (h1 t1) + (1- h1) h2 t2 + (1 – h1) (1 – h2) tm
= (0.8 * 1 ns)  + ((1 – 0.8) * 0.9 * 10 ns) + ((1 – 0.8) * (1 – 0.9) * 500 ns)
= 0.8 ns + 1.8 ns +10 ns = 12.6 ns

14. If a class C is derived from class B, which is derived from class A, ail through publicinheritance, then a class C member function can access

a) Only protected and public data of C and B

b) Only protected and public data of C

c) All data of C and private data of A and B

d) Public and protected data of A and B and all data of C

Explanation:

Access public protected private
Same class yes yes yes
Derived classes yes yes no
Outside classes yes no no

15. Which one of the following is correct about the statements given below?

I. All function calls are resolved at compile-time in C language.

II. All function calls are resolved at compile-time in C++.

(a) Only II is correct

(b) Both I and II are correct

(c)  Only I is correct

(d) Both I and II are incorrect

Explanation: The early binding (static binding) refers to compile time binding and late binding (dynamic binding) refers to runtime binding. C supports only Early Binding but C++ support both binding. Similar statements are:
I. All function calls are resolved at compile-time in Procedure Oriented Programming. TRUE
II. All function calls are resolved at compile-time in OOPS. FALSE

16. When a DNS server accepts and uses incorrect information from a host that has no authority giving that information, then it is called

(a) DNS lookup

(b) DNS hijacking

(c)  DNS spoofing

(d) None of the mentioned

Explanation:

• DNS lookup is the process by which a DNS record is returned from a DNS server.
• DNS hijacking or DNS redirection is the practice of subverting the resolution of DNS.
• DNS spoofing occurs when a DNS server accepts and uses incorrect information.

17. Which of the following is true?

(a) √3+√7 = √10

(b) √3+√7 ≤ √10

(c) √3+√7 < √10

(d) √3+√7 > √10

Explanation:
Lets solve it fast, do square both side and then see.
Square of LHS (√3 + √7)2 = 3 + 7 + 2√3√7 = 10 + something
Square of RHS (√10)2 = 10
Square of LHS > Square of RHS => LHS > RHS => √3 + √7 > √10

18. What is the sum to infinity of the series,

3+ 6x2+9x4+12x6+…   given |x| < 1?

a) 3/(1+ x2)

b) 3/(1+ x2)2

c) 3/(1- x2)2

d) 3/(1- x2)

Explanation: Given is Infinite Geometric Series. Need to find out sum. Lets do.
3 + 6x2 + 9x4 + 12x6 + …..

• We can find the sum of all finite geometric series. But in the case of an infinite geometric series when the common ratio is greater than one, the terms in the sequence will get larger and larger and if you add the larger numbers, you won’t get a final answer. The only possible answer would be infinity.
• So, we don’t deal with the common ratio greater than one for an infinite geometric series. If the common ratio lies between −1 to 1, we can have the sum of an infinite geometric series.
• In this question common ratio is x2, and |x| < 1. So common ratio is less than 1. Now can go to calculate sum by a available formula:
Sum = a1 / (1− r)
Sum = 3 / (1-x2)

19.  lim x → 0 (√(1+x) – √(1-x)) / x is given by

a) 0

b) -1

c) 1

d) 1/2

Explanation: While solving given equation, indeterminate form 0/0 is occurring. Way to solve it, apply L’Hopital’s Rule. Rule says, we need to do is differentiate the numerator and differentiate the denominator and then take the limit.

• Differentiate  √(1+x) = 1 / 2√(x+1)
• Differentiate  √(1-x) = – 1 / 2√(1-x)
• Differentiate  x = 1

lim x → 0 ((1 / 2√(x+1)) + (1 / 2√(1-x))) / 1
= ((1/2) + (1/2)) = 1

20. If (G, -) is a group such that (ab)-1 =a-1 b-1, ∀ a, b ∈ G , then G is a/an

(a) Commutative semi group

(b) Abelian group

(c) Non-abelian group

(d) None of these

Explanation: In abstract algebra, an abelian group, also called a commutative group, is a group in which the result of applying the group operation to two group elements does not depend on the order in which they are written. To see the proof of given statement in question Click Here

21. A given connected graph G is a Euler Graph if and only if all vertices of G are of

(a) Same degree

(b) Even degree

(c) Odd degree

(d) Different degree

Explanation: Euler proved that a necessary condition for the existence of Eulerian circuits is that all vertices in the graph have an even degree, and stated without proof that connected graphs with all vertices of even degree have an Eulerian circuit. The term Eulerian graph has two common meanings in graph theory. One meaning is a graph with an Eulerian circuit, and the other is a graph with every vertex of even degree.

22. Maximum number of edges in a n – node undirected graph without self-loops is

(a) n2

(b) n(n-1)/2

(c) n – 1

(d) n(n+1)/2

Explanation: There is no self loops and this is undirected graph. Then maximum number of edges will be:
(n * (n-1)) / 2

23. The minimum number of NAND gates required to implement the Boolean function A +AB’+ AB’C is equal to

(a) 0 (Zero)

(b) 1

(c) 4

(d) 7

Explanation: For minimal number of gates required first minimize the given Boolean function:
A + AB’ + AB’C
= A (1 + B’ + B’C)
= A
We do not need any gate to implement this because output same as input. And we only need input A.

24. The minimum Boolean expression for the following circuit is

(a) AB+ AC + BC

(b) A + BC

(c) A + B

(d) A+B+C

Explanation: Trace the circuit and write boolean expression as below:
A(B+C) + AB + (A+B)C
= AB + AC + AB + AC + BC
= AB + AC + BC

25. For a binary half-subtractor having two inputs A and B, the correct set of logical expression for the outputs D (= A minus B) and X (= borrow) are

(a) D = AB+ A’B , X=A’B

(b) D = A’B + AB’, X=AB’

(c) D=A’B+ AB’ , X =A’B

(d) D =AB+A’B, X= AB’

Explanation: Half subtractor circuit is given below:

Difference D is always XOR of inputs and Borrow is always AND of complimented value of first input and value of second input.
D = A XOR B = A’B + AB’
X= A’ AND B = A’B

26. Consider the following gate network

Which one of the following gates is redundant?

(a) Gate No. 1

(b) Gate No. 2

(c) Gate No. 3

(d) Gate No. 4

Explanation: Boolean expression generated by given circuit is: w’ + w’z + xyz’ where w’ + w’z will always be w'(1+z) = w’. So there is no importance of Gate no. 2 that is a AND gate and giving w’z because no significance of this.

27.The dynamic hazard problem occurs in

(a) Combinational circuit alone

(b) Sequential Circuit only

(c) Both (a) and (b)

(d) None of the above

Explanation: A dynamic hazard is the possibility of an output changing more than once as a result of a single input change.

28. The logic circuit given below converts a binary code y1 y2, y3 into

(a) Excess-3 code

(b) Gray code

(c) BCD code

(d) Hamming Code

29. The circuit shown in the figure below is

(a) An oscillating circuit and its output is square wave

(b) The one whose output remains stable in ‘1’ state

(c) The one having output remains stable in ‘0’ state

(d) Has a single pulse of three times propagation delay

Explanation: Given circuit is having NOT gates. The NOT gate changes 0 state into ‘1’ and ‘1’ state into ‘0’. So its simple that given circuit is oscillating circuit.

30. If 12A7C16 = X8, then the value of X is

(a) 224174

(b) 425174

(c) 6173

(d) 225174

Explanation: Lets to conversion from HEX (base-16) to OCT (base-8)
HEX to BINARY of given is: 0001 0010 1010 0111 1100
Start right to left to convert BINARY to OCT, take 3-3 bits for OCT digits
0001 0010 1010 0111 1100 => 225174

31. The Excess-3 Code is also called

(a) Cyclic Redundancy Code

(b) Weighted Code

(c) Self-Complementing Code

(d) Algebraic Code

Explanation: The Excess‐3 is a self‐complementing, non-weighted code.
• Excess-3 is a digital code related to BCD that is derived by adding 3 to each decimal digit and then converting the result of that addition to 4-bit binary.
• Since no definite weights can be assigned to the four digit position, excess-3 is an unweighted code that has advantages in certain arithmetic operations.
• Example: Excess-3 code of 5 (0101) is 8 (1000).
• The key feature of the excess-3 code is that it is self-complementing. This means that the 1’s complement of an excess-3 number is the excess-3 code for the 9’s complement of the corresponding decimal number.
• The 9’s complement of a decimal number is found by subtracting each digit in the number from 9. For example, the 9’s complement of 4 is 5. The excess-3 code for decimal 4 is 0111. The 1’s complement of this is 1000, which is the excess-3 code for the decimal 5 (and 5 is the 9’s complement of 4).

32. The simplified Sum of Product form of the following Boolean expression (P+Q’+R’)(P+Q+R) (P+Q+R’)

(a) (P’Q+R)

(b) (P + QR’)

(c) (PQ’+R)

(d) (PQ +R)

Explanation: Lets solve the given Boolean expression:
(P + Q’ + R’) (P + Q + R) (P + Q + R’)
=> (PP + PQ + PR + Q’P + Q’Q + Q’R + R’P + R’Q + R’R) (P + Q + R’)
=> (P + PQ + PR + Q’P + Q’R + R’P + R’Q) (P + Q + R’)
=> (P(1 + Q + R + Q’ + R’) + Q’R + R’Q)) (P + Q + R’)
=> (P + Q’R + R’Q) (P + Q + R’)
=> (PP + PQ + PR’ + Q’RP + Q’RQ + Q’RR’ + R’QP + R’QQ + R’QR’)
=> (P(1 + Q + R’ + Q’R + R’Q) + Q’RQ + Q’RR’ + R’QQ + R’QR’)
=> (P + R’Q + QR’)
=> (P + QR’)

33. Which of the following binary number is the same as its 2’s complement?

(a) 1010

(b) 0101

(c) 1000

(d) 1001

34. The functional difference between SR flip-flop and JK flip-flop is that

(a) JK flip-flop is faster than SR flip-flop

(b) JK flip-flop has a feedback path

(c) JK flip-flop accepts both inputs 1

(d) None of the above

35. Consider a non-pipelined processor with a clock rate of 2.5 GHz and average cycles per instruction of four. The same processor is upgraded to a pipelined processor with five stages; but due to the internal pipeline delay, the clock speed is reduced to 2 GHz. Assume that there are no stalls in the pipeline. The speed up achieved in this pipelined processor is

(a)  3.2

(b) 3.0

(c) 2.2

(d) 2.0

36. What is the output of this C code?

```#include&lt;stdio.h&gt;
void main()
{
int k = 5;
int *p = &k;
int **m = &p;
printf("%d %d %d\n", k, *p, **m);
}
```

(a) 5 5 5

(b) 5 5 junk

(c) 5 junk junk

(d) Compile Time Error

37. Consider a disk pack with 16 surfaces, 128 tracks per surface and 256 sectors per track. 512 bytes of data are stored in a bit serial fashion in a sector. The capacity of the disk pack and the number of bits required to specify a particular sector in the disk respectively

(a) 256 MB, 19 bits

(b) 256 MB, 28 bits

(c) 512 MB, 20 bits

(d) 64 GB, 28 bits

38. Let the page fault service time be 10 ms in a computer with average memory access time being 20 ns. If one page fault is generated for every 106 memory accesses, what is the effective access time for the memory?

(a) 21.4 ns

(b) 29.9 ns

(c) 23.5 ns

(d) 35.1 ns

39. Register renaming is done in pipelined processors

(a) As an alternative to register allocation at compile time

(c) To eliminate certain kind of hazards

(d) As part of address translations

40. In which class of Flynn’s taxonomy, Von Neumann architecture belongs to?

(a) SISD

(b) SIMD

(c) MIMD

(d) MISD

41. What will be output of following program? Assume that you are running this program in little-endian processor.

```#include&lt;stdio.h&gt;
int main( )
{
short a = 320;
char *ptr;
ptr = (char *)&a;
printf("%d",*ptr);
return 0;
}
```

(a) 1

(b) 320

(c) 64

(d) Compilation Error

42. Consider the following segment of C code

```int j, n;
j = 1;
while (j&lt;= n)
j = j*2;
```

The number of comparisons made in the execution of the loop for any n > 0 is

(a) ⌊log2 n⌋*n

(b) n

(c) ⌊log2 n⌋

(d) ⌊log2 n⌋ + 1

43. The following postfix expression with single digit operands is evaluated using a stack

8 2 3 ^ / 2 3 * + 5 1 * –

(Note that ^ the exponential operator)

The top two elements of the stack after the first * operator is evaluated are

(A) 6,1

(b) 5, 7

(c) 3, 2

(d) 1, 5

44. Average number of comparison required for a successful search for sequential search on ‘n’ items is

(a) n/2

(b) (n —1)/2

(c) (n+1)/2

(d) None of the above

45. A Hash Function f is defined as f(key) = key mod 7. With linear probing, while inserting the keys 37, 38, 72, 48, 98, 11, 56 into a table indexed from 0, in which location the key 11 will be stored ( count table Index 0 as 0th location )?

(a) 3

(b) 4

(c) 5

(d) 6

46. A complete binary tree with n non-leaf nodes contains

(a) log2 n nodes

(b) n +1 nodes

(c) 2n nodes

(d) 2n +1 nodes

47. Algorithm design technique used in quick sort algorithm is

(a) Dynamic programming

(b) Backtracking

(c) Divide and Conquer

(d) Greedy Method

48. An FSM (Finite State Machine) can be considered to be a Turning Machine of finite tape length

(a) Without rewinding capability and unidirectional tape movement

(b) Rewinding capability and unidirectional tape movement

(c) Without rewinding capability and bidirectional tape movement

(d) Rewinding capability and bidirectional tape movement

49. Let L = {w ∈ (0+1)*|w has even number of 1s}, i.e. L is the set of all bit strings with even number of ls. Which one of the regular expression below represents L?

(a) (0*10*1)*

(b) 0*(10*10*)*

(c) 0*(10*1*)*0*

(d) 0*1(10*1)*10*

50. Consider the following recurrence

T (n) 2T(√n )+ 1

T(1)=1

Which of the following is true?

(a) T (n)= O (log log n)

(b) T (n) = 0 (log n)

(c) T (n) = 0 (√n )

(d) T (n) = 0 (n)

51. Consider the following statements about the context-free grammar :

G = {S→SS, S→ab, S→ba, S→ ^}

I. G is ambiguous

II. G produces all strings with equal number of a’s and b’s

III. G can be accepted by a deterministic PDA Which combinations below expresses all the true statements about G ?

(a) I only

(b) I and III only

(c) II and III only

(d) I, II and III

52. If L and L’ are recursively enumerable, then L is

(a) Regular

(b) Context-free

(c) Context-sensitive

(d) Recursive

53. S→aSa|bSb|a|b

The language generated by the above grammar over the alphabets { a, b } is the set of

(a) All palindromes

(b) All odd length palindromes

(c) Strings that begin and end with same symbol

(d) All even length palindromes

54. What is the highest type number that can be assigned to this following grammar :

S→Aa, A→Ba, B→abc

(a) Type 0

(b) Type 1

(c) Type 2

(d) Type 3

55. Access time of the symbol table will be logarithmic, if it is implemented by

(a) Linear list

(b) Search Tree

(c) Hash Table

(d) Self-organization list

56. Recursive descent parsing is an example of
(a) Top-down parsers

(b) Bottom-up parsers

(c) Predictive parsers

(d) None of these

57. A top-down parser generates
(a) Rightmost derivation

(b) Rightmost derivation in reverse

(c) Leftmost derivation

(d) Leftmost derivation in reverse

58. Relative mode of addressing is most relevant to writing
(a) Co-routines

(b) Position-independent code

(c) Sharable code

(d) Interrupt Handlers

59. A simple two-pass assembler does which of the following in the first pass?

(a) Checks to see if the instructions are legal in the current assembly mode

(b) It allocates space for the literals

(c) It builds the symbol table for the symbols and their values

(d) All of these

60. Peephole optimization is a form of

(a) Loop op optimization

(b) Local optimization

(c) Constant folding

(d) Data flow analysis

61. At a particular time of computation, the value of a counting semaphore is 7. Then 20 P operation and x V operations were completed on this semaphore. If the final value of the semaphore is 5, x will be

(a) 18

(b) 22

(c) 15

(d) 13

62. With single resource, deadlock occurs

(a) If there are more than two processor competing for that resource

(b) If there are only two processes competing for that resource

(c) If there is a single process competing for that resource

(d) None of these

63. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units, then

(d) None of these

64. Determine the number of page faults when references to pages occur in the following order: 1,2,4,5,2,1,2,4 Assume that the main memory can accommodate 3 pages and the main memory already has the pages 1 and 2, with page one having brought earlier than page 2.

(LRU page replacement algorithm is used)

(a) 3

(b) 5

(c) 4

(d) None of these

65. Working Set (t,k) at an instant of time t is

(a) The set of k future references that the Operating System (OS) will make

(b) The set of future references that the OS will make in next t unit of time

(c) The set of k references with high frequency

(d) The k set of pages that have been referenced in the last t time units

66. A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative. The minimum size of the TLB tag is

(a) 11 bits

(b) 13 bits

(c) 15 bits

(d) 20 bits

67. The real-time operating system, which of the following is the most suitable scheduling scheme?

(a) Round robin

(b) First come first serve

(c) Pre-emptive

(d) Random scheduling

68. In which one of the following page replacement policies, Balady’s anomaly may occur?

(a) FIFO

(b) Optimal

(c) LRU

(d) MRU

69. Consider Join of a relation R with a relation S. If R has m tuples and S has n tuples, then maximum and minimum sizes of the Join respectively are

(a) m + n and 0

(b) mn and 0

(c) m + n and |m — n|

(d) mn and m + n

70. Let R(a, b, c) and S(d, e, f) be two relations in which d is the foreign key of S that refers to the primary key of R

Consider the following four operations in R and S

I. Insert into R

II. Insert into S

III. Deletion from R

IV. Deletion from S

Which of the following can cause violation of the relational integrity constraint above?

(a) Both I and IV

(b) Both II and III

(c) All of these

(d) None of these

71. The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list?
[select title from book as B where (select count(*) from book as T where T.price > B.price) < 5]

(a) Titles of the four most expensive books

(b) Title of the fifth most inexpensive book

(c) Title of the fifth most expensive book

(d) Titles of the five most expensive books

72. Goals for the design of the logical schema include

(a) Avoiding data inconsistency

(b) Being able to construct queries easily

(c) Being able to access data efficiently

(d) All of these

73. Given the relations

employee (name, salary, deptno) and

Which of the following queries cannot be expressed using the basic relational algebra
operations (U, -, x, π, σ, p)? [ GATE CS 2000]

(a) Department address of every employee

(b) Employees whose name is the same as their department name

(c) The sum of all employees’ salaries

(d) All employees of a given department

Explanation: We can’t generate relational algebra of aggregate function using basic operations.

74. Trigger is

(a) Statement that enables to start any DBMS

(b) Statement that is executed by the user when debugging an application program

(c) The condition that the system tests for the validity of the database user

(d) Statement that is executed automatically by the system as a side effect of a modification to the database

Explanation: A database trigger is procedural code that is automatically executed in response to certain events on a particular table or view in a database.

75. The order of a leaf node in a B+ tree is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is 1K bytes, data record pointer is 7 bytes long, the value field is 9 bytes long and a block pointer is 6 bytes long, what is the order of the leaf node? [Gate CS 2007]

(a) 63

(b) 64

(c) 67

(d) 68

Explanation: Lets suppose order is n. A B+ tree leaf node contains following items:

• n Value fields; here 9 bytes long it is
• n data record pointers; here 7 bytes long
• 1 block pointer to point next block; here it is 6 bytes long

A B+ tree node size should <= block size
Here, n9 + n7 + 6 <= 1K
=> 9n + 7n + 6 <= 1024
=> 16n <= 1018
=> n <= 1018/16
=> n <= 63.625
=> n = 63

76. A clustering index is defined on the fields which are of type__________  [ GATE CS 2008]

(a) Non-key and ordering

(b) Non-key and non-ordering

(c) Key and ordering

(d) Key and non-ordering

Explanation: Clustering index is defined on an ordered data file. The data file is ordered on a non-key field.

• Ordered data file means data have a specific order/sequence.
• Data is ordered on basis of some non-key field instead a key field.
• All the data that have same non-key value taken as a single cluster.

77. The Extent to which the software can continue to operate correctly despite the introduction of invalid inputs is called as

(a) Reliability

(b) Robustness

(c) Fault tolerance

(d) Portability

Explanation: robustness is the ability of a computer system to cope with errors during execution and cope with erroneous input. All other given options have different purposes and meaning.

78. Which one of the following is a functional requirement?

(a) Maintainability

(b) Portability

(c) Robustness

(d) None of the mentioned

Explanation: Maintainability, Portability and Robustness all are non-functional requirements. Functional requirements are related to a functionality. A functionality is described as a set of inputs, the behavior, and outputs.

79. Configuration management is not concerned with

(a) Controlling changes to the source code

(b) Choice of hardware configuration for an Application

(c) Controlling documentation changes

(d) Maintaining versions of software

Explanation: Configuration management is the task of tracking and controlling changes in the software. Option (b) is not relevant to software.

80. A company needs to develop a strategy for software product development for which it has a choice of two programming languages L1 and L2. The number of lines of code (LOC) developed using L2 is estimated to be twice the LOC developed with L1. The product will have to be maintained for five years. Various parameters for the company are given in the table below.

 Parameter Language L1 Language L2 Man years needed for development LOC/10000 LOC/10000 Development cost per man year Rs. 10,00,000 Rs. 7,50,000 Maintenance time 5 years 5 years Cost of maintenance per year Rs. 1,00,000 Rs. 50,000

Total cost of the project includes cost of development and maintenance. What is the LOC for L1 for which the cost of the project using L1 is equal to the cost of the project using L2?

(a) 10,000

(b) 5,000

(c) 7,500

(d) 75,000

Explanation:
Let L1 = x
Then L2 will be = 2x
Find LOC for L1 for which cost using L1 is same to cost using L2
=> Cost using L1 = Cost using L2
=> (x/10000) * 10,00,000 + (5 * 1,00,000) = (2x/10000) * 7,50,000 + (5 * 50,000)
=> 100x + 5,00,000 = 150x + 2,50,000
=> 50x =  2,50,000
=> x = 5000