Can anyone guide me as to how to implement a routine(in C) similar to getpid() in C.

That is a unix os api function which can be called from C if you are compiling for *inix os. just google "man getpid"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.