C++ Array accessed with array notation

Description

C++ Array accessed with array notation

#include <iostream>
using namespace std;
int main()//  ww w.  j av a2 s.c  om
{                                       //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;
}



PreviousNext

Related