Please answer fast     What will be the output of the following C++ code? #include using namespace std; int main() { int i; for (i = 0; i < 10; i++); { cout << i; } return 0; } a) 0123456789 b) 10 c) 012345678910 d) compile time error

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter14: Exception Handling
Section: Chapter Questions
Problem 14SA
icon
Related questions
Question

Please answer fast

 

 

What will be the output of the following C++ code?

#include <iostream>
using namespace std;
int main()
{
int i;
for (i = 0; i < 10; i++);
{
cout << i;
}
return 0;
}
a) 0123456789
b) 10
c) 012345678910
d) compile time error

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning