Samiul_Islam_Abir

004

Jul 25th, 2019
130
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. #include<string.h>
  3.  
  4. void main()
  5. {
  6.     int i,n;
  7.     char str[20];
  8.     printf("Enter String\n");
  9.     gets(str);
  10.     n=strlen(str);
  11.     printf("\nReversed string is \n");
  12.     for(i=n-1;i>=0;i--)
  13.     {
  14.        printf("%c",str[i]);
  15.     }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment