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> int main() { srand (clock()); char GUID[40]; int t = 0; char *szTemp = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"; char *szHex = "0123456789ABCDEF-"; int nLen = strlen (szTemp); for (t=0; t<nLen+1; t++) { int r = rand () % 16; char c = ' '; switch (szTemp[t]) { case 'x' : { c = szHex [r]; } break; case 'y' : { c = szHex [r & 0x03 | 0x08]; } break; case '-' : { c = '-'; } break; case '4' : { c = '4'; } break; } GUID[t] = ( t < nLen ) ? c : 0x00; } printf ("%s\r\n", GUID); }

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