void main(int argc,char *argv[])
{
for (int i = 0; i < argc; i++)
{
printf("%s ", argv[i]);
}
}
when I use command ./test 1 2 3
in terminal to execute this program, I got result ./test 1 2 3
,but when I use function execl("/usr/src/test", "1", "2", "3", NULL)
in another program I got result
1 2 3
,why?