Programming MCQs Feed

πŸ“Š C++
Q. Where does the execution of the program starts?
  • (A) user-defined function
  • (B) main function
  • (C) void function
  • (D) else function
πŸ’¬ Discuss
βœ… Correct Answer: (B) main function
πŸ“Š Python
Q. Output of the following python program will be?
Code:
List = [True, 50, 10] 
List.insert(2, 5) 
print(List, "Sum is: ", sum(List))
  • (A) [True, 50, 10, 5] Sum is: 66
  • (B) [True, 50, 5, 10] Sum is: 65
  • (C) TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’
  • (D) [True, 50, 5, 10] Sum is: 66
πŸ’¬ Discuss
βœ… Correct Answer: (D) [True, 50, 5, 10] Sum is: 66
πŸ“Š Linux
Q. What command can be used to locate specific text within a file?
  • (A) where
  • (B) find
  • (C) locate
  • (D) grep
πŸ’¬ Discuss
βœ… Correct Answer: (D) grep
πŸ“Š C++
Q. A class defined within another class in c++ is called
  • (A) nested class
  • (B) interface
  • (C) abstract class
  • (D) inheritance
πŸ’¬ Discuss
βœ… Correct Answer: (A) nested class
πŸ“Š C Programming
Q. A full binary tree with n leaves contains
  • (A) n nodes
  • (B) 2n - 1 nodes
  • (C) log2 n nodes
  • (D) 2n nodes
πŸ’¬ Discuss
βœ… Correct Answer: (B) 2n - 1 nodes
πŸ“Š MySQL
Q. The operator that compares sounds is _____________.
  • (A) SOUNDS SIMILAR
  • (B) SOUNDS LIKE
  • (C) CHECK SOUNDS
  • (D) MATCH SOUNDS
πŸ’¬ Discuss
βœ… Correct Answer: (B) SOUNDS LIKE
πŸ“Š C Programming
Q. What is the initial value of extern storage class specifier?
  • (A) 0
  • (B) Null
  • (C) Garbage
  • (D) Infinite
πŸ’¬ Discuss
βœ… Correct Answer: (A) 0
πŸ“Š PHP
Q. what is the output of below program?
Code:
<?php

if($a=0){
    echo "Sun";
}
else{
    echo "Moon";
}

?>
  • (A) Sun
  • (B) Moon
  • (C) SunMoon
  • (D) Compilation Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) Moon
πŸ“Š SQL Server
Q. Which of these would cause a server to raise a certain error whenever the MS SQL Server Analysis Services also finds an error in the MDX script?
  • (A) IgnoreNone
  • (B) IgnoreAll
  • (C) Ignore
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) IgnoreNone