-
What is the output of this program?
#include
using namespace std;
int main()
{
int p = 15;
if (p < 13) {
for (k = 0; k < 12; k++)
cout << k;
}
else {
cout << k;
}
return 0;
}
-
- Compilation Error
- Runtime Error
- Garbage Value
- All of above
- None of these
Correct Option: A
In function 'int main()':
7:18: error: 'k' was not declared in this scope
11:21: error: 'k' was not declared in this scope