Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ print every element in array

#include<iostream>

int main()
{
 	int array[8] = {1,2,3,4,5,6,7,8};
  	int i = 0;
  
  	while (i <= sizeof(array)/sizeof(int))
    {
     	std::cout << array[i];
      	i++;
    }
}
 
PREVIOUS NEXT
Tagged: #print #element #array
ADD COMMENT
Topic
Name
4+6 =