Related questions with answers
Question
When writing a function that accepts a two-dimensional array as an argument, which size declarator must you provide in the parameter for the array?
Solution
VerifiedAnswered 1 year ago
Answered 1 year ago
When passing a 2D array to a function in C++ using the double square brackets, we have to specify the columns (the second) size declarator. For example, let's say we have a 2D array defined with the following statement:
char minesweeper[20][30];
To pass this array into a function named play, which takes in a 2D char array, we could pass it like this:
play(minesweeper[][30]);
Create an account to view solutions
By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Create an account to view solutions
By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Recommended textbook solutions

Computer Organization and Design MIPS Edition: The Hardware/Software Interface
5th Edition•ISBN: 9780124077263David A. Patterson, John L. Hennessy226 solutions

Fundamentals of Database Systems
7th Edition•ISBN: 9780133970777 (2 more)Ramez Elmasri, Shamkant B. Navathe866 solutions


Introduction to Algorithms
3rd Edition•ISBN: 9780262033848 (5 more)Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen849 solutions
More related questions
- world history
1/4
- world history
1/7