Answers for "prints out the elements in the array c++"

C++
1

print array c++

void printArray(int a[],int n){
	for(int i=0;i<n;i++)
      cout<<a[i]<<" ";
  	cout<<endl;
}
Posted by: Guest on February-10-2021
-1

prints out the elements in the array c++

for (auto i : a){ //C++11
	cout << i<< " ";
}
Posted by: Guest on March-27-2021

Code answers related to "prints out the elements in the array c++"

Browse Popular Code Answers by Language