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
Splunk uses ________ to categorize the type of data being indexed..
timama [110]
<span>Splunk is the system process that handles indexing, searching, forwarding and the web interface for Splunk Enterprise.</span>
Splunk uses sourcetypes to categorize the type of data being indexed.
Splunk supports the Common Information Model (CIM). 
7 0
2 years ago
Read 2 more answers
A(n) _____ is the highest educational degree available at a community college. master bachelor associate specialist
baherus [9]
<span>An associate's degree requires two years of academic study and is the highest degree available at a community college</span>
5 0
2 years ago
Read 2 more answers
Consider the following two code segments, which are both intended to determine the longest of the three strings "pea", "pear", a
Nikolay [14]

Answer:

e) Code segment II produces correct output for all values of str, but code segment I produces correct output only for values of str that contain "pea" but not "pear".

Explanation:

<em>if - elseif - else statements work in sequence in which they are written. </em>

  • <em> </em>In case <em>if() statement is true, </em>else if() and else statements will not get executed.
  • In case <em>else if() statement is true</em>, conditions in if() and else if() will be checked and else statement will not be executed.
  • In case <em>if() and else if() both are false</em>, else statement will be executed<em>.</em>

First, let us consider code segment I.

In this, first of all "pea" is checked in if() statement which will look for "pea" only in the String str. So, even if "pearl" or "pear" or "pea" is present in 'str' the result will be true and "pea" will get printed always.

After that there are else if() and else statements which will not get executed because if() statement was already true. As a result else if() and else statements will be skipped.

Now, let us consider code segment II.

In this, "pearl" is checked in if() condition, so it will result in desired output.

Executable code is attached hereby.

Correct option is (e).

Download java
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
3 0
2 years ago
Explain briefly why the crowd sourcing technique could help a single individual with a difficult personal decision.
atroni [7]
Crowdsourcing<span> is the process of getting work or funding, usually online, from a crowd of people. The word is a combination of the words 'crowd' and 'outsourcing'. The idea is to take work and outsource it to a crowd of workers.</span>
4 0
2 years ago
Which of the following best describes open-source web browsers?
podryga [215]
Hello, Good Works mate!

Answer: A) <span>Open-source web browsers allow non-paid access and distribution.

Kind Regards.</span>
4 0
2 years ago
Read 2 more answers
Other questions:
  • Which are examples of intrapersonal goals? Check all that apply. Lea plans to finish her next project before the due date. Erick
    12·2 answers
  • Data Analysis The Iris Plants Database contains 3 classes of 50 instances each, where each class refers to a type of Iris plant.
    15·1 answer
  • Which of the following is technically not a programming language?
    12·2 answers
  • Create an abstract Division class with fields for a company's division name and account number, and an abstract display() method
    14·1 answer
  • Ciscon Telecom is a mobile operator in the European Union. The company provides personalized services to its customers, and its
    8·2 answers
  • Now that the classList Array has been implemented, we need to create methods to access the list items.
    5·1 answer
  • In this exercise we look at memory locality properties of matrix computation. Th e following code is written in C, where element
    9·1 answer
  • Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed
    13·1 answer
  • A company has deployed four 48-port access layer switches to a switch block. For redundancy each access layer switch will connec
    14·1 answer
  • A group of developers for a startup company store their source code and binary files on a shared open-source repository platform
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!