answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
serious [3.7K]
2 years ago
9

#include ... void sig_handler(){ static int i = 1; printf("Beep\n"); alarm(i); ++i; } int main(){ struct sigaction sa; sa.sa_fla

gs = 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?
Computers and Technology
1 answer:
anygoal [31]2 years ago
3 0

Answer:

Explained below

Explanation:

After the compiling the program it prints "Going to infinite loop" after that i started the timer till 4.5 sec. The program prints more than 4 beeps nearly 6-7 beep messages were printed.

The number "Beep" would always be strictly greater than 4.

Hence, if the above program is run for 7.5 seconds after it prints "Going in an infinite loop", it will print Beep for about 9-10 times. Hence, the number will always be greater than 7

You might be interested in
Which of the following facts determines how often a nonroot bridge or switch sends an 802.1D STP Hello BPDU message?
irinina [24]

Answer:

b. The Hello timer as configured on the root switch.

Explanation:

There are differrent timers in a switch. The root switch is the only forwarding switch in a network, while non root switches blocks traffic to  prevent looping of BPDUs in the network. Since the root switch is the only forwarding switch, all timing configuration comes from or is based on the configuration in the root.

The hello timer is no exception as the nonroot switch only sends 802.1D DTP hello BPDU messages forwarded to it by the root switch and its frequency depends on the root switch hello timer.

8 0
2 years ago
Exercise 3.6.9: 24 vs. "24"5 points
Anton [14]

This is all you need to do for this one add quotes around the number to make it a string. Then for the question I don't know if you need to answer it but I said that when there is only one string it creates and addition problem of 24 + 24 and then when there are two strings it puts them right next to each other making it look like the number 2424.

7 0
2 years ago
Janice is unsure about her future career path she has grown up on her family farm but she is also interested in medicine Janice
KiRa [710]
Janice can actually used both knowledge as an advantage. She can use her background in farming while learning more about medicine. In such a way, she can have a strong advantage in medicinal farming - like learn ways to create good and effective drugs from plants, etc. 
5 0
2 years ago
A good way to avoid skids is to _____ when coming into a turn. A. accelerate B. decelerate C. counter steer D. cover brake
lord [1]

Answer:

B decelerate

Explanation:

Deceleration will help in avoiding you from loosing control of the vehicle

3 0
1 year ago
Read 2 more answers
________ is free software created and updated by a worldwide community of programmers. office software a web service cloud-based
Yanka [14]
I would thing ios or apple cloud personally.
6 0
2 years ago
Other questions:
  • Refer to the exhibit. pc1 issues an arp request because it needs to send a packet to pc3. in this scenario, what will happen nex
    9·1 answer
  • Theresa is a certified teacher. She just had a baby and would like to stay home, but still wants to teach. Which career would be
    11·2 answers
  • You have been tracking your exercise routine, which involves running, lifting weights, yoga, and stretching. You want to see wha
    15·2 answers
  • Fill in the blank; "As well as their traditional role of computing data, computers are also extensively used for..."
    14·1 answer
  • Robert needs to apply formatting from one set of text to multiple other sets of text throughout the document. Which option shoul
    7·1 answer
  • Address the FIXME comments. Move the respective code from the while-loop to the created function. The add_grade function has alr
    14·1 answer
  • In a real-world environment, changing granularity requirements might dictate changes in primary key selection, and those changes
    15·1 answer
  • (1) Output a menu of automotive services and the corresponding cost of each service. (2 pts) Ex: Davy's auto shop services Oil c
    15·1 answer
  • A machine is having issues, so the user is responsible for getting the machine serviced. Which stage of the hardware lifecycle d
    13·1 answer
  • Write an expression that continues to bid until the user enters 'n'.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!