Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int i,n=0;
- char a[10],temp=0;
- printf("enter the no. of values");
- scanf("%d",&n);
- printf("enter the values");
- for(i=0;i<n;i++)
- {
- scanf("%s",&a[i]);
- }
- for(i=0;i<n;i++)
- {
- temp=a[i];
- a[i]=a[n];
- a[n]=temp;
- n--;
- }
- for(i=0;i<n;i++)
- {
- printf("%s",&a[i]);
- }
- }
Add Comment
Please, Sign In to add comment