Array in C++
Array: Array in C++ Array is defined as an ordered list of homogeneous data element. May be of type int, float,char or double All these element are stored in consecutive memory locations An array is described by a single name or an identifier and each element in an array is referenced by a subscript enclosed in a pair of square brackets Syntax: type variable_name[lengthofarry]; Program: Write a program take input and display the element using array in cpp. Code: #include< iostream> using namespace std; int main() { int i,arr[100],no; cout<<"Enter the number of element (less than 100)"; cin>>no; for(i=0;i<no;i++) { cout<<"Enter the element at"<<i <<" place"; cin>>arr[i]; } cout<<"Elemen in the arry is :"; i=0; while(i<no) { cout<<"\n"<<arr[i]; i++; } } Ouput: Enter the number of element (less than 100...