A
Q. What is the output of the following C++ code?
Code:
#include <iostream>
using namespace std;
int f = 100;
int main()
{
int a;
{
int b;
b = 10;
a = 25;
f = 35;
cout << b << a << f;
}
a = 40;
cout << a << f;
return 0;
}
using namespace std;
int f = 100;
int main()
{
int a;
{
int b;
b = 10;
a = 25;
f = 35;
cout << b << a << f;
}
a = 40;
cout << a << f;
return 0;
}
- Correct Answer - Option(C)
- Views: 22
- Filed under category C++
- Hashtags:
Discusssion
Login to discuss.