πŸ“Š C++
Q. What is the output of the following program?
Code:
#include 
using namespace std;
 
int main () {
   // local variable declaration:
   int x = 1;

   switch(x) {
   case 1 :
      cout << "Hi!" << endl; 
      break;
   default :
      cout << "Hello!" << endl;
   }
}
  • (A) Hello
  • (B) Hi
  • (C) HelloHi
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (B) Hi

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
181
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
85%
Success Rate