-
What will be the output of these two programs?
(i)#ifndef Example_H
#define Example_H
int n = 251;
#endif
(ii)#include
#include "Example.h"
using namespace std;
int main(int argc, char * argv[] )
{
cout << num++;
return 0;
}
-
- 252
- 251
- Compilation Error
- Runtime Error
- None of these
Correct Option: B
In this program, we have created a header file and linked that into the source program and we post incrementing that because of that it is printed as 251.