Question 19Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)

What is typically returned by the getpid system call in Unix-based operating systems?

  1. AThe process ID of the kernel
  2. BProcess ID of the current process
  3. CProcess ID of the first process
  4. DProcess ID of the parent process
Show answerHide answer

Correct answer: (B) Process ID of the current process

Explanation

getpid() returns the process ID of the calling (current) process. The parent's PID is returned by getppid().

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 1 (9:00 AM)

This is question 19 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 1 (9:00 AM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.