in c simply add three lines in the begining of your program:
int x;
printf("enter the size of the array to be entered :");
scanf("%d",&x);
after that use x as your maximum limit of array in your program.
in c++ just replace above printf & scanf statements by
cout<<"enter the size of the array to be entered :";
&
cin>>x;
respectively and do not use brackets.
Arrays whose size can be altered are known as dynamic arrays.
no
The size of a function can be determined from the size of the array. Arrays and functions are both used in computer programming.
int comp(const int a1[], const int a2[], const int size) { int i; for(i = 0; i < size; ++i) { if(a1[i] != a2[i]) { return 0; } } return 1; }
yes, a structure is a user-made data type so that user can manipulate multiple data types simultaneously. a structure covers up sum limitation of arrays as in it provides heterogenous data type.
By using the library function #define A[] we can define the size of arrays
Arrays whose size can be altered are known as dynamic arrays.
no
The size of a function can be determined from the size of the array. Arrays and functions are both used in computer programming.
The required syntax for creating C arrays include the brackets, array size, variety length arrays, codes like std:vector, classPTR, and many more to create C arrays.
No. An array is a collection of objects of any type, such as doubles, not just characters. You can even have arrays of arrays, or arrays of structs. In C, the size of an array is fixed, but it is possible to write code that will allow you to manually make it variable in size.
leakage in arrays occur when you declare an array with big size and using only very few bytes.
int comp(const int a1[], const int a2[], const int size) { int i; for(i = 0; i < size; ++i) { if(a1[i] != a2[i]) { return 0; } } return 1; }
You have array of type int with a name myArray, and you do not know size of the array.
yes, a structure is a user-made data type so that user can manipulate multiple data types simultaneously. a structure covers up sum limitation of arrays as in it provides heterogenous data type.
Arrays having more than one dimension is known as multi-dimensional arrays. Multi-dimensional arrays is also known as arrays-of-arrays.
Arrays having more than one dimension is known as multi-dimensional arrays. Multi-dimensional arrays is also known as arrays-of-arrays.