From db29eb80549671f419a223413038ce46525cba3b Mon Sep 17 00:00:00 2001 From: Lidhish C <37290709+lidhishc@users.noreply.github.com> Date: Thu, 29 Oct 2020 21:13:08 +0530 Subject: [PATCH] Reverse a String using C Reverse a String using C Programming --- C Program/ReverseString.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 C Program/ReverseString.c diff --git a/C Program/ReverseString.c b/C Program/ReverseString.c new file mode 100644 index 000000000..cce9f939d --- /dev/null +++ b/C Program/ReverseString.c @@ -0,0 +1,15 @@ +#include +#include +int main() +{ + char s[100]; + + printf("Enter a string to reverse\n"); + gets(s); + + strrev(s); + + printf("Reverse of the string: %s\n", s); + + return 0; +}