Child Process PID

Hi,
Can anybody solve this query?
A parent process forks 2 child processes. How does the child process know it's PID without the parent process sending it.
Apart from the "ps-ef" option, what other options are there if any?

As far as command line instruction goes I can only think of 'ps' command along with its various options but programatically each process can call getpid and getppid routines to know its and its parent pid. Moreover the parent process always knows the pids of its child when it spawns a child process.

The child process can call getpid().