Question
1.
#include
2.
using namespace std;
3.
int funcstatic(int)
4.
{
5.
int sum = 0;
6.
sum = sum + 10;
7.
return sum;
8.
}
9.
int main(void)
10.
{
11.
int r = 5, s;
12.
s = funcstatic(r);
13.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
int funcstatic(int)
4.
{
5.
int sum = 0;
6.
sum = sum + 10;
7.
return sum;
8.
}
9.
int main(void)
10.
{
11.
int r = 5, s;
12.
s = funcstatic(r);
13.
cout
Answer: Option A
Was this answer helpful ?
Eventhough we passed the value, we didn't caught to manipulate it, So it is printing as 10.
Output:
$ g++ res2.cpp
$ a.out
10
Was this answer helpful ?
More Questions on This Topic :
Question 3.
When we call that resource is leaked?
....
Submit Solution