Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ loop through array backwards


int [] a = {1,2,3};

for(int i = a.size()-1;i>=0;i--)
  	cout<<a[i]<<" ";
cout<<endl;
 
PREVIOUS NEXT
Tagged: #loop #array
ADD COMMENT
Topic
Name
8+1 =