Advertisement
aiNayan

6(ii)

Nov 30th, 2020
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. char ch[50], i;
  5. printf("Enter a string: ");
  6. gets(ch);
  7. for (i = 0; ch[i] != '\0'; i++);
  8. ;
  9. for (i; i != -1; i--)
  10. printf("%c", ch[i]);
  11. return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement