answersLogoWhite

0

The following code displays a 2D array with 4 rows and 3 columns. #include using namespace std; void print(int A[][3],int N, int M){ for (R = 0; R < N; R++) for (C = 0; C < M; C++) cout << A[R][C];}int main (){ int arr[4][3] ={{12, 29, 11}, {25, 25, 13}, {24, 64, 67}, {11, 18, 14}}; print(arr,4,3); return 0;}

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

Difference between 1D array and 2D arrays?

1d array contains single row and multiple columns and 2d array contains multiple row and multiple columns. 2d array is a collection of 1d array placed one below another,while 1d array is simple a collection of elements.


How do you pass a 2D array in a functions?

if you were to call a function you would write it as: function(array[][], int pretend, double pretend2); arrays will always be passed by reference, not by value.


Flow chart of multiplication of 2d array?

algorithm &amp; flowchrt of 2d matrices


Is there any overhead issues if you make a 2D array arr28 rather than making a 1D array arr16 of size 16 Any memory issues or execution differences between the two?

2D array of size 2x8 and 1D array of size 16


Subtraction of 2d array in java?

looda le lo mera


What is the code for 2D knockout?

FISH


What is the interest rate on a savings account?

What kind of code is your school ID? 1D or 2D? If you can see the data from the 2D bar code with your eye, there is no need for 2D bar code to exist any more.You can cnctaot me on Yahoo! message. Maybe I can help you if I know what code is it.


Write the additive inverse of?

-c+2d


What is the secret code for 2d knockout boxing?

the secret code is FISH


How do you access 2D array elements by using single variable?

int main() { int array[3][3]; int i; for(i=0; i &lt;9;i++) { printf("the element is %d\n", array[i/3][i%3]); } return 0; }


Can you write a C program to find the sum of a given column in a 2D array?

Use the following function to find the sum of a given column in an array of integers: int sum_column (int** array, unsigned int rows, unsigned int columns, unsigned int column) { assert (column&lt;columns); int accumulator int row; accumulator = 0; for (row=0; row&lt;rows; ++row) { accumulator += array[row][column]; } return accumulator; }


How do you show a Hard Working man in a 2d sketch of a Mansion?

( ) _|_ | /\