What is the output of the following code, if the user enters the sequence 10 17 35 7?

const int MAX = 4;
int items[MAX];
for (int i = 0; i < MAX; i++)
cin >> items[i];
items[2] += 2;
for (int i = 0; i < MAX; i++)
cout << items[i] << “ “;

a) 12 19 37 9
b) 10 2 35 7
c) 10 17 37 7
d) 10 19 35 7


c) 10 17 37 7

Computer Science & Information Technology

You might also like to view...

Declare and open input file stream fileIn and output file stream fileOut. Attach these to files named input.dat and output.dat. Write #include directives for any required header files. Make certain names from namespaces are accessible.

What will be an ideal response?

Computer Science & Information Technology

Consider a relation schema MyAccount (StockSymbol, Quantity, Price), which records the user's stock holdings: the name of the stock, quantity, and current price. StockSymbol is a key. The user wants a small window on her desktop to show the following view:

CREATE VIEW MyTotals(StockSymbol, Total) AS
SELECT M.StockSymbol, M.Quantity * M.Price
FROM MyAccount M
The stock broker allows the user to compute the value of the view only once a day, so periodic recomputation of the view is not an option. However, the broker allows triggers that re whenever an update to the rows of MyAccount occurs. Write a row-level trigger that can provide the user with an up-to-date view of the above kind.

Computer Science & Information Technology

Which of the following is not one of the four commonly used formats??

A. ?Zip code B. ?Phone number C. ?Social Security D. ?Birth date

Computer Science & Information Technology

?To add pictures, videos, or documents in a Sway, select a card in the left pane and __________. 

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology