#include <stdio.h>
#include <string.h>

void reverseString_in_place(char* s);

int main(void) {
	char str[100];// your code goes here
	
	strcpy(str, "String reverse in-place demo");
	printf("Before string reverse : %s\n", str);
	reverseString_in_place(str);
	printf(" After string reverse : %s\n", str);
	
	return 0;
}

void reverseString_in_place(char* s) {
	char *p, *q, tmp;
	
	p = s; 
	q = s + strlen(s) - 1;
	while ( p <= q ) {
	    tmp = *p;
	    *p  = *q;
	    *q  = tmp;
	    p++;
	    q--;
	}
}
