Skip to content

Commit

Permalink
Shanthanu9 added some details
Browse files Browse the repository at this point in the history
  • Loading branch information
shanthanu9 committed Oct 16, 2017
1 parent d6aa1af commit ed3f906
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions reverse/shanthanu9.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include<stdio.h>
#include<string.h>

int main() {
char str[100], temp;
int i, j = 0;

printf("\nEnter the string :");
gets(str);
i = 0;
j = strlen(str) - 1;

while (i < j) {
temp = str[i];
str[i] = str[j];
str[j] = temp;
i++;
j--;
}

printf("\nReverse string is :%s", str);
return (0);
}

0 comments on commit ed3f906

Please sign in to comment.