+ 1

What is array??

while array needs both row and column, example of a one dimensional array. datatype arr[4]; if 4 is number of rows or column then where is rows or column?? since we have read that in an array arr[3][4], 3 is number of rows and 4 is column. i even didn't get the arrayyyyyyyyy..

26th Jan 2018, 1:10 PM
Mubarak Hussain
Mubarak Hussain - avatar
2 Answers
+ 19
26th Jan 2018, 1:28 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 6
int arr[4] is a 1D array You can imagine it either containing elements horizontally or vertically upto your convinience 4 are neither rows nor columns example : int a[4]={1,2,3,4} can be represented as 1 2 3 4 or 1 2 3 4
26th Jan 2018, 1:28 PM
Abhishek Tandon
Abhishek Tandon - avatar