adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #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: (c).infinite times of printing n

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?