Welcome Guest | Sign in | Register
Arrays - Discussion Page For Q.10440 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Arrays > Questions and Answers

Q: Write a for loop to total the contents of the multi dimensional float array balances, as declared in question 4.
A. Statement 1
for( row = 0, total = 0; row < 3; row++ )
for( column = 0, total = 0; column < 5; column++ )
total = total + balances[row][column];
B. Statement 2
for( row = 0, total = 0; row < 3; row++ )
for( column = 0; column < 5; column++ )
total = total + balances[row][column];
C. Statement 3
for( row = 0, total = 0; row < 3; row++ )
for( column = 0; column < row; column++ )
total = total + balances[row][column];
D. Cannot be determined

Answer and Explanation

Answer:Statement 2
for( row = 0, total = 0; row < 3; row++ )
for( column = 0; column < 5; column++ )
total = total + balances[row][column];

Explanation:
There is no explanation...

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.