What is the output of the following program?
#include <iostream>
using namespace std;
int getValue(int) ;
int main()
{
int x = 2;
cout << getValue(x) << endl;
return 0;
}
int getValue(int num)
{
return num + 5;
}
A) 5
B) 2
C) 7
D) "getValue(x) "
Correct Answer:
Verified
Q8: A function's return data type must be
Q14: It is possible for a function to
Q15: Local variables are initialized to zero by
Q19: When a function is called, flow of
Q20: One reason for using functions is to
Q34: Which line in the following program
Q36: This is a dummy function that is
Q37: What is the output of the
Q37: EXIT_FAILURE and _ are named constants that
Q40: Look at the following function prototype. int
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents