Question
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int i;
6.
for (i = 0; i < 10; i++);
7.
{
8.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int i;
6.
for (i = 0; i < 10; i++);
7.
{
8.
cout
Answer: Option B
Was this answer helpful ?
for loop with a semicolon is called as body less for loop. It is used only for incrementing the
variable values. So in this program the value is incremented and printed as 10.
Output:
$ g++ stat2.cpp
$ a.out
10
Was this answer helpful ?
More Questions on This Topic :
Question 4.
The switch statement is also called as?
....
Submit Solution