Company: HCL Technologies

1. How many bytes does an array A(1:8,2:2,1:5) require for storage if
each
location of array is of 24 bits long?
a] 200 b] 480 c] 600 d] 800 e]none of these.

2. For a function to be reentrant which of the following must be true?
a. All var that it uses must be on stack.
b. It should have a single entry point.
c. it should not be recursive.
d. It should not modify itself.
e. both a&d.

3. Stack as a data structure is not a must for recursion- state whether
this
is true or false
a] true. b] false.

4. The avg case time complexity of the lexical analyser is (n is the
size of
the input string to be analysed)
a.O(log n) b.O(n) c.O(nlogn) d. (n**2) e O(n**3).

5. The lexical analyser can be implemented as
a. NFA with empty transitions
b. A NFA without empty transitions
c. A DFA
d. a & b
e All the above.
questions 6 & 7.
x=1;
a=0; b=1; c=0;
if((x) || (c=a+b)){
b=2;
c=c+b;
}

6. The value of c in the above code, assuming strict evaluation is
a.0 b.1 c.2 d.3. e. None of the above.

7. Assuming lazy evaluation is
a.0 b.1 c.2 d.3 e. None of the above.

8. In the complete binary tree of n nodes, how many nodes have a parent
as
well as children?
a] [n+1]/2-1 b] [n-1]/2-1 c][n-1]/2+1 d] [n-1]/2 e][n+1]/2

9. Macro expansion is performed in the second pass of a two pass
assembler
a. True b. False

10. Which of the following is not a necessary property of ooprogramming?
a. data abstraction b. operator & function overloading
c. inheritance d. Polymorphism.

11. Which of the following method definitions will give error in
compilation
in c++?
i) void class1::method1(int a=10,short b,char *c)
ii)void class1::method1(int a=10,short b,char *c=NULL)
iii)void class1::method1(int a,short b=0, char *c)
a. i b. ii c. all the above d i&iii

12. Which one of the following is true about friendship in c++?
a.friendship is transitive
b.friendship is inherited
c.friendship is both transitive & inherited
d.friendship is neither transitive nor inherited.

13. HDLC refers to family of protocols at the
a] transport layer b] data link layer c] network layer d] physical layer

14. If four channels are being multiplexed by a time division
multiplexor(TDM) then.
a]every second slot in the aggregate is for the same channel
b]the slot allocation is independent of the multiplexor
c]every fourth time slot in the aggregate is for the same channel
d]none of the above.

15. Which of the following stmts, ragarding datagram subnetis false?
a] it can handle node failure better than a virtual circuit subnet
b] it requires more bits of address information in each packet than
a virtual circuit subnet.
c] The packets always reach the destination in correct seq.
d] it can work on both connection oriented and connection less networks.
e] none of the above.

16. What is the networking protocol on NetWare Lans?
a] TCP/IP
b] IPX/SPX
c] ODI
d] none of the above

17. Which of the following is a network management protocol?
a] SNMP. b] NNTP c] SMTP d] none of the above.

18 Given two relations and their tables
A|B|CC|D|E
—|——|——– ——|——-|—–
a|m|pq|x|m
b|m|qq|y|n
b|n|rr|x|n
[R] [S]
the number of tuples in the natural join of R and S is
a]2 b] 3 c]4 d]5 e]6

19. The outer joins are used to?
a] join tbles fron multiple data bases
b] To select the difference between tables.
c] join tables without loss of rows.
d] for none of these.

20. Assume a table exam has a column marks. Which of the following
queries
will return the second highest mark in the table.
a] select marks from exam where marks <> (select max(marks)from exam)
b] select max(marks)-1 from the exam
c] select max(marks)from exam where marks<>(select max(marks) from exam)
d] select max(marks)from exam where marks<(select max(marks)from exam) e] c and d.