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


The cout << sales[0] + sales[1]; statement will______

[A]. display 22000
[B]. display 10000 + 12000
[C]. display sales[0] + sales[l]
[D]. result in an error

Answer: Option A


No answer description available for this question.

Chandra said: (May 11, 2011)  
Can anybody tell how you got this answer?

Navi said: (Jun 14, 2016)  
Please give the explanation for the solution.

Jonathan said: (Jul 23, 2017)  
The question is incomplete until the values of sales array are given.

Raj said: (Oct 29, 2018)  
Where did you get this 22000 from? Please explain it clearly.

Ayesha Rani... said: (Apr 19, 2020)  

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]

result in an error

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

display 22000.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.