Anonymous
public c v1 · immutable#include<windows.h>#include<stdio.h>int x;int threadone(){ while(1) { x++; printf("T1: %d\n",x); sleep(500);}return;}int threadtwo(){ while(1) { x++; printf("T2: %d\n",x); sleep(500);}return;}int main(){ CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&threadone,NULL,0,0); CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&threadtwo,NULL,0,0); getch(); return;}