Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int n = 15;
6.
for ( ; ;)
7.
cout
Options:
A .  error
B .  15
C .  infinite times of printing n
D .  none of the mentioned
Answer: Option C

There is not a condition in the for loop, So it will loop continuously.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers