For e.g. execl("/projectx/do_this_now","do_this_now", -1, 0, 55,(char*)0), here the compiler would interpret 0 as the second argument and hence the execl command would terminate as 0 is considered as NULL. This can be resolved by passing each argument as an character pointer instead of integer.