C++ Institute CPA - C++ Certified Associate Programmer CPA-21-02 Question # 22 Topic 3 Discussion

C++ Institute CPA - C++ Certified Associate Programmer CPA-21-02 Question # 22 Topic 3 Discussion

CPA-21-02 Exam Topic 3 Question 22 Discussion:
Question #: 22
Topic #: 3

What happens when you attempt to compile and run the following code?

#include

using namespace std;

int mul (int a, int b=2)

{

int r;

r=a*b;

return (r);

}

int main ()

{

cout << mul(1) << mul(2,4);

return 0;

}


A.

It prints: 2


B.

It prints: 28


C.

It prints: 8


D.

It prints: 6


Get Premium CPA-21-02 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.