Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute CPA-21-02 Exam - Topic 7 Question 60 Discussion

What happens when you attempt to compile and run the following code?#include using namespace std;int main(){int a=5;cout
A) It prints: 9
B) It prints: 9.9
C) Compilation error
D) None of these

C++ Institute CPA-21-02 Exam - Topic 7 Question 60 Discussion

Actual exam question for C++ Institute's CPA-21-02 exam
Question #: 60
Topic #: 7
[All CPA-21-02 Questions]

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

#include

using namespace std;

int main()

{

int a=5;

cout << ((a < 5) ? 9.9 : 9);

}

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel