C++ int type Array initialization

Description

C++ int type Array initialization

#include <iostream> 
  
using namespace std; 
  
int main(int argc, char *argv [])
{ 
        int intArray[5] = { 0, 1, 2, 3, 4 }; 
        cout << intArray[0] << endl; 
        cout << intArray[1] << endl; 
        cout << intArray[2] << endl; 
        cout << intArray[3] << endl; 
        cout << intArray[4] << endl; 
        return 0; 
}



PreviousNext

Related