From 1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Wed, 19 Apr 2017 14:57:49 +0530 Subject: Merged Shamik's work --- src/c/string/strrev/gstrreva.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/c/string/strrev/gstrreva.c (limited to 'src/c/string/strrev') diff --git a/src/c/string/strrev/gstrreva.c b/src/c/string/strrev/gstrreva.c new file mode 100644 index 0000000..8ceb16a --- /dev/null +++ b/src/c/string/strrev/gstrreva.c @@ -0,0 +1,15 @@ +#include +#include "strrev.h" + +void gstrreva(char* str,int size,char* out) +{ + int i=-1,j=0; + + while(str[++i]!='\0'); + + while(i>=0) + out[j++] = str[--i]; + + out[j]='\0'; + +} -- cgit