πŸ“Š C++
Q. What is the output of the following C++ code?
Code:
#include <iostream>
using namespace std;
int main()
{
  int x = 10;
  if (x < 10) {
    for (i = 0; i < 10; i++)
      cout << i;
  }
  else {
    cout << i;
  }
  return 0;
}
  • (A) Compilation error
  • (B) 012345678
  • (C) 123456789
  • (D) 12345678910
πŸ’¬ Discuss
βœ… Correct Answer: (A) Compilation error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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