online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include<stdio.h> #include<pthread.h> #include<string.h> static void *threadfun(void *arg) { char *s=(char *)arg; printf("%s\n",s); return (void *)strlen(s); } int main() { pthread_t t1; void *res; int ret; ret = pthread_create(&t1,NULL,threadfun,"hello world"); if (ret != 0) { printf("pthread create error\n"); return -1; } ret = pthread_join(t1,&res); if (ret != 0) { printf("pthread join error\n"); return -1; } printf("thread returned %ld \n",(long)res); 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