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> // simulated keystrokes // The -1 will stop the sim if no keys detected before then // Normally, you should never get to the -1 int testcase[]={0,0,1,1,9,9,8,0,0,0,-1}; int tc=0; int main() { int code, oldcode; code=0; oldcode=0; do { oldcode=code; code=testcase[tc++]; // get keys if (code==-1) // should never happen { printf("End of data\n"); break; } printf("Loop %d: old=%x,code=%x\n",tc-1,oldcode,code); } while (oldcode<=code); printf("Processing %x\n", oldcode); 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.

  • {user}

      {timestamp}

    {content}

    #FunctionFile:Line
    VariableValue
    ExpressionValue