ARRAY in C++ Get link Facebook X Pinterest Email Other Apps LEC:12,ARRAY in C++Source code:/*ARRAY: An array is used to store a collection of data,of the same type. DECLARATION: type arrayName [ arraySize ]; //vectors are dynamic array 6 8 9 12 5 8 4 3*/#include<iostream>using namespace std;int main(){ //int array1[10]={2,4,7,9}; //size of the array =4 //cout<<array1[2]; //index: 0 to 3 int n; cout<<"Enter the size of array you want to design: \n"; cin>>n; int array2[n]; for(int i=0;i<n;i++) { cout<<"Enter the data at index"<<i<<endl; cin>>array2[i]; } cout<<"The elements of array : \n"; for(int i=0;i<n;i++) { cout<<"the data at index"<<i<<" : "<<array2[i]<<endl; } return 0;} Get link Facebook X Pinterest Email Other Apps Comments
PROJECT: HTML | CSS | JS Hey Guys Here is My project on WEB:- Landing Website | Completely Responsive | Free source code : https://codepen.io/swatimaurya/full/yLXyKrg Read more
RunwayWithCode Document Projects C++ Java Web development Queries For any Doubts and Queries, Join our Telegram Group :) Click Here for joining.:) Read more
web development Lectures Web Development Lectures👇👇 LEC 3: Goto : N OTES V IDEO LINK LEC 2: Goto : N OTES V IDEO LINK LEC 1: Goto : N OTES V IDEO LINK For any queries join our telegram group click to join PPT of OOPS Read more
Comments
Post a Comment