System call return value in C

c, linux

Solution

Use system() function. It returns the status of command executed. If this is 0, then it would seem this is successfull.

Problem

I am using system function in C code to invoke cp command. I want to know whether it got executed successfully or not?

Original source