Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

Traversing a C++ Array

#include <iostream>

using namespace std;

int main()
{
	int array[5]={1,2,3,4,5};
	// Way 1
	for(int i=0;i<5;i++)
		cout<<array[i]<<" ";
	
cout<<endl;
	return 0;
}
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Traversing #Array
ADD COMMENT
Topic
Name
2+3 =