online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #define MAX_SIZE 100 // Maximum string size int main() { char str[MAX_SIZE], reverse[MAX_SIZE]; char *s = str; char *r = reverse; int len = 0; /* Input string from user */ printf("Enter any string: "); gets(str); /* Find length of string */ while(*(s++)) len++; /* * Store each character from end of original string * to reverse string */ s--; while(len >= 0) { *(r++) = *(--s); len--; } *r = '\0'; printf("\nOriginal string = %s\n", str); printf("Reverse string = %s", reverse); return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue