No products in the cart.

What is the difference between one …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

What is the difference between one dimensional and two dimension
  • 1 answers

Sia ? 2 years, 10 months ago

BASIS FOR COMPARISON ONE-DIMENSIONAL TWO-DIMENSIONAL
Basic
 
Store single list of elements of similar data type. Store 'list of lists' or 'array of arrays' or 'array of one dimensional arrays'.
Declaration /*declaration in C++
type variable_name[ size ];*/
/*declaration in Java
type variable_name [ ];
variable_name = new type[size]; */
/*declaration in C++
type variable_name[size1][size2]; */

/*declaration in Java
type variable_name= new int[size1][size2]; */
Alternative Declaration /* In Java
int [ ] a= new int [10]; */
/* In Java
int [ ] [ ] a= new int [10][20]; */
Total Size in Bytes Total Bytes =sizeof(datatype of array variable)* size of array. Total Bytes= sizeof(datatype of array variable)* size of first index*size of second index.
Receiving parameter It can be received in a pointer, sized array or an unsized array. Parameter receiving it should define the rightmost dimension of an array.
Dimensions One dimensional. Two dimensional.
http://mycbseguide.com/examin8/

Related Questions

How to solve dimensional numerical ?
  • 1 answers
Rest and motion are relative terms explain
  • 0 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App