C, Linux

Get current process id with C in Linux

getpid function

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
 
int main(void)
{
    printf("%d", getpid());
    return EXIT_SUCCESS;
}

Get current process id with C in Windows.