online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include <string.h> void main() { char str1[100], tmp; int l, lind, rind,i; printf("\n\nPrint a string in reverse order:\n "); printf("-------------------------------------\n"); printf("Input a string to reverse : "); scanf("%s", str1); l = strlen(str1); lind = 0; rind = l-1; for(i=lind;i<rind;i++) { tmp = str1[i]; str1[i] = str1[rind]; str1[rind] = tmp; rind--; } printf("Reversed string is: %s\n\n", str1); }

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