online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> int digitCount(int n){ int counts=0; while(n!=0){ counts++; n=n/10; } return counts; } void replace(int n){ int count=digitCount(n); int A[count]; int i=count-1; while(n!=0){ int y=n%10; if(y==0){ A[i]=1; i--; } else{ A[i]=0; i--; } n=n/10; } for(int j=0;j<count;j++){ printf("%d",A[j]);} } int main() { int n; scanf("%d",&n); replace(n); 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