Vidyalelo
Computer Science · Q308

Linux

Engineering and GATE · Computer Science · question 308

Q308

What will happen if we press "Ctrl+c" key two times after running this program? #include #include void response(int); void response(int sig_no) printf("Linux "); signal(SIGINT,SIG_DFL); int main() signal(SIGINT,response); while(1) printf("Example "); sleep(1); return 0;

A.
process will terminate in the first time
B.
process will terminate in the second time
Answer
C.
process will never terminate
D.
none of the mentioned

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board