Question: The following is a partial listing of a C program to handle Interrupts. If the program runs without errors, indicate the numbers of all the
The following is a partial listing of a C program to handle Interrupts. If the program runs without errors, indicate the numbers of all the sentences where a CtrlC command can terminate the process by preventing that sentence to execute. Namely, if CtrlC is pressed just before sentence X is executed, will that sentence run? If not, X should be part of your answer.
static void handlerint sig
return;
int mainint argc, char argv
sigsett bSet;
sigsett dSet;
float x ;
sigemptyset&bSet;
sigaddset&bSet, SIGINT;
x x;
if sigprocmaskSIGBLOCK, &bSet, &dSet exit ;
x x;
if signalSIGINT handler SIGERR exit ;
x xx;
x xx;
if sigprocmaskSIGSETMASK, &dSet, NULL exit ;
printfxf
x;
Correct answer:
Correct answer:
Correct answer:
Answer,
Answer,
Answer,
Answer,
Answer,
Answer,
Incorrect answer:
are correct answers, is wrong
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
