Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     // Array inicialisation
  6.     int arr[] = {14,2,3,4,5,6,7,8, 9};
  7.    
  8.     // Output every element of array with index "e"
  9.     // Index "e" starts from 1 and increases by 2 on each iteration
  10.     for(int e=1; e<sizeof(arr)/sizeof(arr[0]); e+=2){
  11.         printf("%d \n", arr[e]);
  12.     }
  13.    
  14.    
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement