summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/string/strrev/gstrreva.c
blob: 8ceb16abee1e7e0ca20d91f18957e57c478319bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include<stdio.h>
#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';
  
}