Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
void func(int x)
4.
{
5.
cout
Options:
A .  2
B .  20
C .  21
D .  22
Answer: Option D

As we are calling the function two times with the same value, So it is printing as 22.
Output:
$ g++ pfu.cpp
$ a.out
22



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers