#include <iostream>
#include <unistd.h>

using namespace std;

int main() {
    cout << "Calling system call getpid()" << endl;
    cout << "The process ID is: " << getpid() << endl;
    return 0;
}
JOIN OUR NEWSLETTER
And get notified everytime we publish a new blog post.