Nitin400

Traversing Array

Aug 3rd, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int n,i=0,a[20];
  6. printf("Enter the length of array:");
  7. scanf("%d",&n);
  8. printf("Enter the element\n");
  9. for (i=0;i<n;i++)
  10. {
  11.     scanf("%d",&a[i]);
  12. }
  13. printf("Traversing of the Array:");
  14. for (i=0;i<n;i++)
  15. {
  16.     printf("\n%d",a[i]);
  17. }
  18. return(0);
  19. }
Add Comment
Please, Sign In to add comment