Q1. What is the range of any 8 bit signed no.?
A. 0 to 255B. -255 to 254C. -128 to 127D. 0 to 515
Q2. Consider the following statements and accordingly tell the output of these programs:
integer x = 34.54, y = 20, z = -5print ( y > 50 AND z > 10 or x > 30)
A. 1B. -1C. 10D. 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 1Integer sum = 0 // Statement 2While ( x < 10) // Statement 3{Sum = x*x*x // Statement 4x = 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 programB. Statement 1C. Statement 6D. 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. RecursionB. Object Oriented ProgrammingC. IterationD. Decision Making
Q5. In which area of a class are function and data directly accessible, even outside the class?
A. PrivateB. ProtectedC. PublicD. None
Q6. In programming, if a trees depth is 3 levels determine the size of that tree?
A. 4B. 8C. 2D. 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 NC. O x N x ND. 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. FIFOB. LIFOC. BothD. 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 80B. Change by 160C. Change by 50D. Will remain the same
10. 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 -+∧