Advertisement
touhid_xml

Looping Single Dimensional Array in C

Jul 15th, 2015
456
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4. int numbers[10] = {
  5. 10,
  6. 20,
  7. 30,
  8. 40,
  9. 50,
  10. 60,
  11. 70,
  12. 80,
  13. 90,
  14. 100
  15. };
  16.  
  17.  
  18. int main(){
  19.     int i;
  20.     for(i=0; i<10; i++){
  21.             int arrayValue = numbers[i];
  22.  
  23.             printf("%d\n",arrayValue);
  24.  
  25.  
  26.  
  27.     }
  28.  
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement