I have C program saved under
/usr/sbin/. This program prints "Hello World" every two seconds.
I can call/execute this program from any folder.
When I write C program with
system("a.out"); in it, it's executing from any folder, but when I use
execl() I need to give the absolute path,
execl("/usr/sbin/a.out", "a.out");, otherwise it's not executing. Why?