Socket client in C using threads
You have to allocate sizeof(int) bytes for socket file descriptor, not 1
fflush(stdin) has undefined behavior
its not good idea to access a file descriptor in two threads simultaneously, be careful
joins are never happens, because none of two threads have exit conditions, so the socket will never close gracefully