Virtusa C/C++ placement paper


Posted on :05-03-2016
Q1. What is the range of any 8 bit signed no.?

A. 0 to 255
B. -255 to 254
C. -128 to 127
D. 0 to 515

Q2. Consider the following statements and accordingly tell the output of these programs:

integer x = 34.54, y = 20, z = -5
print ( y > 50 AND z > 10 or x > 30)

A. 1
B. -1
C. 10
D. 0

Q3. Disha designs a program which can print the product of the cubes of numbers 1 — 10 (First 10 natural numbers)
This is the program: 

Integer x = 0 // Statement 1
Integer sum = 0 // Statement 2
While ( x < 10) // Statement 3
{
Sum = x*x*x // Statement 4
x = x + 1 // Statement 5
}
Print sum // Statement 6

Is her program totally correct? If not where does the problem lie?

A. No error in the program
B. Statement 1
C. Statement 6
D. Statement 4

Q4. 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
B. Object Oriented Programming
C. Iteration
D. Decision Making

Q5. In which area of a class are function and data directly accessible, even outside the class?

A. Private
B. Protected
C. Public
D. None

Q6. In programming, if a trees depth is 3 levels determine the size of that Tree?

A. 4
B. 8
C. 2
D. 6

Q7. 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. O x N
C. O x N x N
D. None

Q8. 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

Q9. 
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)

A. Output will change by 80
B. Change by 160
C. Change by 50
D. Will remain the same

Q10. Choose the correct postfix notation for this infix notation:
((A + B)* C — (D — E)) ∧ (F + G))

A. AB + C* DE -- FG +∧
B. AB + C D*E -- FG +∧
C. A+ BC* DE - FG- +∧
D. AB + C* DE - FG -+∧



Virtusa Related Companies


Placement Papers for All Companies





FreshersLive - No.1 Job site in India. Here you can find latest 2023 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail...
DMCA.com Protection Status