online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <stdio.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char** argv) { int d = strlen(argv[1]); char b[d + 1]; char a[d + 1]; strcpy(a, argv[1]); b[d] = '\0'; b[0] = a[0] == a[1] ? '0' : '1'; for(int i = 1; i < d - 1; i++) { b[i] = a[i] == a[i+1] && a[i] == a[i - 1] ? '0' : '1'; } b[d - 1] = a[d - 1] == a[d - 2] ? '0' : '1'; printf("%s\n", b); }

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