πŸ“Š Object Oriented Programming (OOP)
Q. Which of the following control expressions are valid for an if statement?
  • (A) an integer expression
  • (B) a boolean expression
  • (C) either a or b
  • (D) neither a nor b
πŸ’¬ Discuss
βœ… Correct Answer: (C) either a or b
πŸ“Š Object Oriented Programming (OOP)
Q. What will be the values of x, m and n after execution of the following statements? Int x, m, n;
m=10; n=15;
x= ++m + n++;
  • (A) x=25, m=10, n=15
  • (B) x=27, m=10, n=15
  • (C) x=26, m=11, n=16
  • (D) x=27, m=11, n=16
πŸ’¬ Discuss
βœ… Correct Answer: (C) x=26, m=11, n=16
πŸ“Š Object Oriented Programming (OOP)
Q. Which of the following functions are performed by a constructor?
  • (A) construct a new class
  • (B) construct a new object
  • (C) construct a new function
  • (D) initialize objects
πŸ’¬ Discuss
βœ… Correct Answer: (D) initialize objects
πŸ“Š Object Oriented Programming (OOP)
Q. Which operator is having right to left associativity in the following?
  • (A) array subscripting
  • (B) function call
  • (C) addition and subtraction
  • (D) type cast
πŸ’¬ Discuss
βœ… Correct Answer: (D) type cast

Jump to