Professional Documents
Culture Documents
Virtusa Technical Questions
Virtusa Technical Questions
A. 0 to 255
B. -255 to 254
C. -128 to 127
D. 0 to 515
2. Consider the following statements and accordingly tell the output of these programs:
A. 1
B. -1
C. 10
D. 0
3. Disha designs a program which can print the product of the cubes of numbers 1 – 10
(First 10 natural numbers)
Integer x = 0 // Statement 1
x = x + 1 // Statement 5
https://www.freshersnow.com/
Print sum // Statement 6
Is her program totally correct? If not where does the problem lie?
B. Statement 1
C. Statement 6
D. Statement 4
4. There is a problem which inputs a number n. This problem has a unique property
that given you can solve this problem for (n-1) you can easily solve it for n. Which
technique would apply best in such a case?
A. Recursion
C. Iteration
D. Decision Making
5. In which area of a class are function and data directly accessible, even outside the
class?
A. Private
B. Protected
C. Public
D. None
A. 4
B. 8
https://www.freshersnow.com/
C. 2
D. 6
7. You are to add three matrices of order N X N. What will be the time complexity?
A. O(N x N x N)
B. OxN
C. OxNxN
D. None
8. Determine the option which is a form of access and is commonly used in addition and
removal of nodes from a dedicated queue.
A. FIFO
B. LIFO
C. Both
D. None
9. x = 40
y = 35
z = 20
w = 10
If these are the values assigned, comment of output of these two statements.
Statement 1: print x * y / z – w
Statement 2: print x * y / (z – w)
B. Change by 160
C. Change by 50
https://www.freshersnow.com/
10. Choose the correct postfix notation for this infix notation:
A. AB + C* DE -- FG +∧
B. AB + C D*E -- FG +∧
C. A+ BC* DE - FG- +∧
D. AB + C* DE - FG -+∧
https://www.freshersnow.com/