online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> int count(char str[100]){ int count=0; for(int i=0; str[i];i++){ count++; } return count; } void reverse(char str[100]){ int n=count(str); int start = 0; int end = n-1; while (start < end) { if (str[start] == ' ') { start++; continue; } else if (str[end] == ' ') { end--; continue; } else { int temp=str[start]; str[start]=str[end]; str[end]=temp; start++; end--; } } for(int i=0;str[i];i++) printf("%c",str[i]);} int main() { char str[100]; scanf("%[^\n]s",str); // printf("%s",str); reverse(str); 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