Array accessed with array notation - C++ Data Type

C++ examples for Data Type:Array

Description

Array accessed with array notation

Demo Code

#include <iostream>
using namespace std;
int main()//from  w w w. j a  va2s . co m
{                                       //array
    int intarray[5] = { 3, 5, 7, 2, 3 };
    for(int j=0; j<5; j++)                  //for each element,
       cout << intarray[j] << endl;         //print value
    return 0;
}

Result


Related Tutorials