Prerequisite : Multithreading in C
Syntax :- pthread_t pthread_self(void);
The pthread_self() function returns the ID of the thread in which it is invoked.
In function thread id = 1 In main thread id = 1
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.