Horje
print array c++ Code Example
print array c++
void printArray(int a[],int n){
	for(int i=0;i<n;i++)
      cout<<a[i]<<" ";
  	cout<<endl;
}
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++;
    }
}
prints out the elements in the array c++
for (auto i : a){ //C++11
	cout << i<< " ";
}




Cpp

Related
unity failed to load window layout Code Example unity failed to load window layout Code Example
how to output to console c++ Code Example how to output to console c++ Code Example
ob for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. Code Example ob for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. Code Example
how to use list.addAll on c++ vetor Code Example how to use list.addAll on c++ vetor Code Example
std string to wstring Code Example std string to wstring Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8