Guest User

Untitled

a guest
Jan 22nd, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int i,n=0;
  5. char a[10],temp=0;
  6. printf("enter the no. of values");
  7. scanf("%d",&n);
  8. printf("enter the values");
  9. for(i=0;i<n;i++)
  10. {
  11. scanf("%s",&a[i]);
  12. }
  13. for(i=0;i<n;i++)
  14. {
  15. temp=a[i];
  16. a[i]=a[n];
  17. a[n]=temp;
  18. n--;
  19. }
  20. for(i=0;i<n;i++)
  21. {
  22. printf("%s",&a[i]);
  23. }
  24. }
Add Comment
Please, Sign In to add comment