-
What is the output of this program?
#include
using namespace std;
int glob = 12;
int main()
{
int p;
{
int q;
q = 13;
p = 25;
global = 35;
cout << q<<" " << p<<" " <}
p = 20;
cout <<" "<< p<<" "<< glob;
return 0;
}
-
- 25 35 20 35
- 35 20 35
- Compilation Error
- 13 25 35 20 35
- None of these
Correct Option: D
The local values of p and glob within the block are more dominant than the global values.