I have this assignment where i have to create a program that executes another one, and it can terminate it, see how much ram it uses, and runtime. i have tried using system(); but it doesn't enable me to terminate the program after a set duration of time.. Any help would be appreciated.

Try looking up the functions fork() and execlp().

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.