home
search
help
profile
liking the experience? our app is even better
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now  
showing results for how to iterate through a array in c 2b 2b
1#include <iostream>
2#include <array>
3
4int main()
5{
6	int aNumbers[] = { 0, 1, 2, 3, 4, 5 };
7	int count = 0;	
8	
9	for (int aNumber : aNumbers)
10	{		
11		std::cout << "Element "<< count << " : " << aNumber << std::endl;
12		count++;
13	}
14}
upvote
downvote