How many time "Example" will print in this program?
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
int main()
{
if( execl("/bin/ls","ls",NULL) == -1){
perror("execl");
exit(1);
}
printf("Example\n");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
int main()
{
if( execl("/bin/ls","ls",NULL) == -1){
perror("execl");
exit(1);
}
printf("Example\n");
return 0;
}
B. 1
C. 2
D. none of the mentioned
Answer: Option A
Join The Discussion