Question: What is the output of the following program: #include using namespace std; int fun(int data); int main() { int data = 3; data =
What is the output of the following program: #include using namespace std; int fun(int data); int main() { int data = 3; data = fun(data); cout < < "data is " < < data < < endl; return 0; } int fun(int data) { int x = 8, sum= = 0; while (--x) { sum += x; if (x %3 == 0) break; } return ++sum; Select one: a. data is 13. b. error c. data is 141 d. data is 21
Step by Step Solution
3.54 Rating (154 Votes )
There are 3 Steps involved in it
The image youve provided contains a sample of a C program and multiple choice answers labeled a b c ... View full answer
Get step-by-step solutions from verified subject matter experts
