-
What is the output of this program?
#include <iostream>
using namespace std;
int StaticFunction(int)
{
int sum = 0;
sum = sum + 12;
return sum;
}
int main(void)
{
int num = 5, Res;
Res = StaticFunction(Res);
cout << Res << endl;
return 0;
}
-
- 12
- Compilation Error
- Runtime Error
- 5
- None of these
Correct Option: A
Even Though we passed the value, we didn’t caught to manipulate it, So it is printing as 12.