online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include<stdio.h> #include <sys/types.h> #include<unistd.h> #include<stdlib.h> int main() { int a = 10; pid_t pid; pid = vfork(); switch(pid) { case -1: perror("vfork"); exit(1); case 0: printf("child message %d\n",getpid()); a = 20; printf("the a value:%d\n",a); exit(1); default: printf("parent message %d\n",getpid()); printf("the a value:%d\n",a); break; } 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