+ 2
ARRAYS
pls define arrays ....with proper example...and maybe a small array program with output ( at least the definitation please
3 odpowiedzi
+ 3
int a[]={1,2,3}; // dont need to mention size if we are going to declare it like this
+ 2
Arrays are the group of many data with a single variable name and all data are stored along with an index number starting from 0.
int main()
{
int a[3]={1,2,3} ;
cout<<a[0] ; // outputs 1
cout<<a[1] ; // outputs 2
cout<<a[2] ; // outputs 3
return 0;
}
hope this helps
+ 2
thank you for your contribution