15,918,267 members
See more:
Hi,
A) Create 2D array of size[4][3] Then insert values to the 1st column of the array from the keyboard and assign 0 for all the other elements.

B) Write a function called dispalyArray() to display the content.

void dispalyArray (int arr[][4], int rows, int columns);

What I have tried:

I do not know much about arrays. So trying to learn about arrays from the beginning.
Posted
Updated 14-Sep-16 2:54am
v2
phil.o 14-Sep-16 6:40am

## Solution 1

C++
```int arr[4][3] = {0};//init a 2-dimensional array with size of 4 x 3 with value of 0
arr[1][0] = 3;//setting a value at position
int value = arr[1][0];//getting the value ```

For output on the screen you can use the print command.

With that knowledge it really should be very easy.

Member 12739755 14-Sep-16 7:34am
Thank u very much.. No its an exam question

## Solution 2

We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
So, start working. If you are stuck on a specific problem, show your code and explain this exact problem, we may help.

Here is links to references books on C and C++ by the authors of the languages. Note than C is the ancestor of C++, so knowing C is always useful with C++.
The C Programming Language - Wikipedia, the free encyclopedia[^]
https://hassanolity.files.wordpress.com/2013/11/the_c_programming_language_2.pdf[^]
http://www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf[^]

C++ Programing Language[^]

Member 12739755 14-Sep-16 7:39am
Thank you very much..I have done selection questions, functions questions and file handling questions last days by referring links which are related to C++..but i couldn't understand arrays :( . That's why I'm looking for help
Patrice T 14-Sep-16 10:23am

## Solution 3

If you are really interested in `C++` arrays, then have also a look at std::array[^] class.