C++ Institute CPA - C++ Certified Associate Programmer CPA-21-02 Question # 38 Topic 4 Discussion

C++ Institute CPA - C++ Certified Associate Programmer CPA-21-02 Question # 38 Topic 4 Discussion

CPA-21-02 Exam Topic 4 Question 38 Discussion:
Question #: 38
Topic #: 4

Which code, inserted at line 8, generates the output "100"?

#include

using namespace std;

int fun(int);

int main()

{

int *x = new int;

*x=10;

//insert code here

return 0;

}

int fun(int i)

{

return i*i;

}


A.

cout << fun(*x) ;


B.

cout << fun(10);


C.

cout << fun(5) ;


D.

cout << fun(y) ;


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.