4a

By: Anonymous4/1/2025103 views Public Note
Using getpid #include #include int main() { pid_t pid; pid = getpid(); printf("Process ID: %d\n", pid); return 0; } Output: Process ID: 1125 Using exit #include #include int main() { printf("Program is terminating using exit()\n"); exit(0); printf("This will not be printed.\n"); return 0; } Output: Program is terminating using exit()

Want to create your own notes?

Join thousands of users writing securely on ProNotepad.