subject

#include void sig_handler(){ static int i = 1; printf("beep\n"); alarm(i); ++i; } int main(){ struct sigaction sa; sa. sa_flags = 0; sa. sa_handler = sig_handler; if(sigaction(sigalrm, & sa, null) ! = 0){ printf("failed to bind handler.\n"); exit(1); } printf("going into an infinite loop.\n"); alarm(1); while(1); return 0; }

suppose the above program is run for 7.5 seconds after it prints "going into an infinite loop". the program is run multiple times where the "system load" from other processes sharing the cpu will vary from none to many other processes. which best characterizes how many times "beep" is printed?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:50
Match the personality traits with their description
Answers: 1
question
Computers and Technology, 22.06.2019 15:20
The north and south regions had very diferent economies in the 1800s.
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Alex’s family members live in different parts of the world. they would like to discuss the wedding plans of one of their distant relatives. however, alex wants all the family members to talk to each other simultaneously so that they can make decisions quickly. which mode of internet communication should they use? a. blog b. email c. wiki d. message board e. instant messaging
Answers: 2
question
Computers and Technology, 23.06.2019 21:00
Which task uses a simple parameter?
Answers: 1
You know the right answer?
#include void sig_handler(){ static int i = 1; printf("beep\n"); alarm(i); ++i; } int main(){ s...
Questions
question
Mathematics, 15.02.2021 20:10
question
Mathematics, 15.02.2021 20:10
question
History, 15.02.2021 20:10
Questions on the website: 13722362