Exec() in Operating System
Oct 8, 2025 · 3 min read · exec() -> executes a new program. The memory space of the child process—its code, stack, and heap—is completely overwritten by the new program. Example 1: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sy...
Join discussion