What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int n = 15;
for ( ; ;)
cout << n;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int n = 15;
for ( ; ;)
cout << n;
return 0;
}A. error
B. 15
C. infinite times of printing n
D. none of the mentioned
Answer: Option C

Join The Discussion