Computer Science - Object Oriented Programming Using C++ - Discussion

Discussion Forum : Object Oriented Programming Using C++ - Section 7 (Q.No. 14)
14.
The cout << sales[0] + sales[1]; statement will______
display 22000
display 10000 + 12000
display sales[0] + sales[l]
result in an error
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
6 comments Page 1 of 1.

Aavej Shaikh said:   2 years ago
Thanks for explaining @Ayesha Rani.

Ayesha Rani... said:   4 years ago
@All.

In this question by following the statement, we look at options ...
Like option A.B.C.D.

All options are part of the program.

display 10000 + 12000
Option B.

display sales[0] + sales[l]
C

result in an error
D.

cout << sales[0] + sales[1]; (what statement show)
So Answer is : A

display 22000.

Raj said:   5 years ago
Where did you get this 22000 from? Please explain it clearly.

Jonathan said:   7 years ago
The question is incomplete until the values of sales array are given.
(1)

Navi said:   8 years ago
Please give the explanation for the solution.

Chandra said:   1 decade ago
Can anybody tell how you got this answer?

Post your comments here:

Your comments will be displayed after verification.