Answer to Question #214172 in C++ for Jaguar

Question #214172

QUESTION 7 

Which of the following declarations correctly declares a two dimensional array of floats named prices that has 10 

rows and 5 columns? 

1. const int NUMROWS = 10; 

const int NUMCOLS = 5; 

float prices[NUMROWS + NUMCOLS]; 

2. const int NUMROWS = 10; 

const int NUMCOLS = 5; 

float prices[NUMROWS,NUMCOLS]; 

3. const int NUMROWS = 10; 

const int NUMCOLS = 5; 

float prices[NUMCOLS][NUMROWS]; 

4. const int NUMROWS = 10; 

const int NUMCOLS = 5; 

float prices[NUMROWS][NUMCOLS]; 




1
Expert's answer
2021-07-07T01:52:56-0400
CORRECT ANSWER: 
Option 4: 

const int NUMROWS = 10; 
const int NUMCOLS = 5; 
float prices[NUMROWS][NUMCOLS]; 

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS