Académique Documents
Professionnel Documents
Culture Documents
a. RQSP
b. QRPS
c. SRPQ
d. PQRS
1. The maximum number of nodes on level l of a binary tree is which of the following (Root is level
1)
a. 2l-1
b. 3l-1
c. 2l
d. 2l-1
2. Following program is to print the sum of all cubes, where the value of the cubes go from 0 to
100.
a. Statement 1
b. Statement 2
c. Statement 3
d. No Error
3. Sirisha writes a program to find an element in the array A[5] with the following elements in
order 8, 30, 40, 45, 70. She runs the program to find a number X. X is found in the first iteration
of binary search. What is the value of X?
a. 40
b. 8
c. 70
d. 30
4. What is the term given to the variable whose scope is beyond all the scopes, which can be
accessed by all the scopes?
a. Universal Variable
b. Global Variable
c. External Variable
d. Auto Variable
e. Both 2 and 3
5. Which one of the following is the lowest level format to which the computer converts a higher
language program before execution?
a. English Code
b. Machine Code
c. Assembly Language
d. System Language
6. Following Function takes input as n, an even integer and calculates the sum of first n even
natural numbers
function sum (n)
{
If (n equals 2)
return 2
else
return (n+sum(n-2))
}
For a function call sum(30), how many times will the function sum be called to compute the
sum?
a. 1
b. 30
c. 15
d. 16
7. There are two loops which are nested. This implies which one of the following?
a. Two loops, one after the other
b. Tow loops, one inside the other
c. One loop with two different iteration counters
d. Two loops with same iteration count
8. calss rocket
private:
public: // statement 1
height =a;
weight=b;
function main()
a. rocket is a class with rocket1 and rocket 2 as its objects. height and weight are the
attributes of the rocket
b. rocket is a class with rocket1 and rocket2 as its attributes, height and weight are the
objects of class rocket
c. rocket is a class with rocket1, rocket2 , height and weight as its attributes
d. rocket is a class with rocket1, rocket2 , height and weight as its objects
9. A writes a code in C++ and passes it on to B. B does some indentation in some statements of the
code. What will this lead to?
a. Faster Execution
b. Lower memory requirement
c. Correction for errors
d. Better readability
10. Somu wants to use a data structure in which the cost of deleting, adding and traversing its
elements is the same and constant. Which of the following data structures should he use?
a. B-Tree
b. AVL Tree
c. Queue
d. Stack
11.
a. Differ by 80
b. Same
c. Differ by 50
d. Differ by 160
12. Stack is useful for implementing
a. Radix Search
b. Breadth fast search
c. Recursion
d. None
13.
function modify(y,z)
{
Y=y+1;
z=z+1;
return y-z
}
function calculate()
{
integer a=5, b=10, c
c=modify(a,b);
print a
print space
print c
}
Assume that A and B were passed by value. What will be the output on executing function
calculate ()?
a. 11 -5
b. 10 -5
c. 6 -5
d. 5 -5
14. In the execution process of a program, this technique involves the intermediate representation
to be compiled to native machine code at run time. What is the name of this technique?
a. Static Compilation
b. Run time interpretation
c. Static Interpretation
d. Just in time compilation
15. Following program is to print the largest number out of three inputted numbers.
a. Statement 1
b. Statement 2
c. Statement 3
d. None of the above
21. What is space complexity of a program?
a. Amount of hard disk space required to store the program
b. Amount of hard disk space required to compile the program
c. Amount of memory required to run the program
d. Amount of memory required to compile the program
22.
function main()
{
integer i=0.7
static float m=0.7
if (m equals i)
print “We are Equal”
else if (m>i)
print “I am Greater”
else
print “I am Lesser”
}
What will be the output of the give code?
a. We are Equal
b. I am Greater
c. I am Lesser
d. Error
23. A variable cannot be used
a. Before it is declared
b. After it is declared
c. In the function it is declared in
d. Can always be used
24. Apoorva writes a sorting algorithm. The algorithm takes different amount of time to sort two
different lists of same size. What is the possible difference between two lists?
a. All numbers in one list are more than 100, while the other are less than 100
b. The ordering of numbers with respect to magnitude in the lists has different properties
c. One list has all negative numbers, while the other has all positive numbers
d. One list contains 0 as an element, while the other does not
25. Sorting is not possible by using which of the following methods?
a. Insertion
b. Selection
c. Exchange
d. Deletion
1. 2, 4, 12, 48, ?
a. 480
b. 240
c. 960
d. 340
2. Problem: What is the amount of Cement exported from China?
Statements:
1. China’s export to America is 65,000 tones and this is 8% of the total cement exports
2. China’s total export tonnage of cement is 15% of the total of 1 million tones
a. Statement 1 alone is sufficient in answering the problem
b. Statement 2 alone is sufficient in answering the problem
c. Both statements put together are sufficient to answer the problem
d. Both statements even put together are not sufficient to answer the problem
e. Either of the statement is sufficient to answer the problem
If A / B and B / C, then
a. A+C
b. AXC
c. A-C
d. A%C
8. Sohail is facing south, he turns 135 degrees in the anti-clock wise direction and then 45 degree
in clock wise direction. Which direction is he facing now?
a. North
b. East
c. West
d. South
9. Pick the odd man out
a. MQ2
b. RV2
c. PS3
d. DM3
10. Symbols -, + , * and / mean the following
A – B means A is equal to B
A + B means A is 3 more than twice of B
A * B means A is 70 percent of B
Using these symbols and taking the given statements true, find out that which of the given
conclusions are definitely true?
Statements: X + Y, Z * Y, Z – A
Conclusions
1. Z / X
2. A / X
a. Only 1 is true
b. Only 2 is true
c. Both are true
d. Neither are true
11. Pick the odd man out
a. EGK
b. BEN
c. CGP
d. AEU
12. Passage
1. X, Y, Z, P and R are sitting in a row in front of a camera
2. X is on the left of the person sitting in the center, but is on the right of Y
3. Z is on the right of P and R is on the right of Z
4. R is the second person from the person sitting in the center
a. Y
b. R
c. Data not sufficient
d. None
13. Which pair is X sitting between?
a. P and Z
b. P and R
c. Y and P
d. Y and Z
14. Who among the following sitting in the corner?
a. X
b. P
c. Y
d. Z
15. Who is sitting in the center?
a. P
b. X
c. Y
d. Z
16. Arrange the following words in most meaningful order
1. Probation
2. Interview
3. Selection
4. Appointment Letter
5. Advertisement
6. Application
a. 5, 6, 2, 3, 4, 1
b. 5, 6, 3, 2, 4, 1
c. 5, 6, 4, 2, 3, 1
d. 6, 5, 4, 3, 2, 1
17. Problem Question