CS 355 Systems Programming Lab 8 - using signal()
Objective: write a program that provides a custom handler for the interrupt signal. What to do?
Write a C program prime that uses a brute force approach to find prime numbers.
⚫ prime needs to keep track of the largest prime number found so far. Use the signal() function to provide a custom handler for the SIGINT signal
When Ctrl-C is pressed, prime needs to do the following:
Print the largest prime number found so far:
Prompt the user whether to quit;
Accept exactly one character as the input without requiring the user to press Enter; Quit if the user presses y or Y.
Typical output generated by prime will look as follows:
.
$ prime
17 Quit [y/n]? n
271 Quit [y/n]? z
521 Quit [y/n]? N
1061 Quit [y/n]? n
1783 Quit [y/n]? y
$
What to submit?
• A single C source code file with your work.
• A screenshot (in PNG or JPG format) showing the output of prime.

Answers

Answer 1

The objective is to write a C program called "prime" to find prime numbers using a brute force approach, and the submission should include a single C source code file and a screenshot of the program's output.

What is the objective of the given lab exercise and what needs to be included in the submission?

In the given lab exercise, the objective is to write a C program called "prime" that uses a brute force approach to find prime numbers. The program should keep track of the largest prime number found so far and utilize the signal() function to provide a custom handler for the SIGINT signal (Ctrl-C).

When Ctrl-C is pressed, the program should print the largest prime number found, prompt the user to quit, accept a single character input without requiring the user to press Enter, and quit if the user enters 'y' or 'Y'. The expected output of the program should display the prime numbers found and the prompt for quitting.

The submission for this lab should include a single C source code file with the program implementation and a screenshot showing the output of the program, demonstrating the functionality described above.

Learn more about C program

brainly.com/question/33334224

#SPJ11


Related Questions

Why do designers of smartphones hide computer processing details from
you?
A. So you can talk longer on the phone
B. So you can focus on otherthings
C. So you can buy more phones
O
D. So you can sleep more peacefully

Answers

Answer:

b.you can focus on otherthings

Answer: b

Explanation:

You have an azure storage account named storage1. You create the following encryption scopes for storage1: scope1 that has an encryption type of microsoft-managed keys scope2 that has an encryption type of customer-managed keys which storage services can be used with scope2?.

Answers

When customer-managed keys are set up for the storage account, data in Blob storage and Azure Files is always secured by them.

In order to use customer-managed keys with Azure Storage encryption, the key vault must have both soft delete and purge protection turned on. When you create a new key vault, soft delete is turned on by default and cannot be turned off. When persisting your data to the cloud, Azure Storage encryption automatically encrypts the data saved on Azure managed disks (OS and data disks) at rest. However, Azure Storage does not encrypt disks that have encryption enabled at the host level. One of the strongest block ciphers currently available, 256-bit AES encryption, is used to encrypt and decrypt data in Azure Storage in a transparent manner and is FIPS 140-2 compliant.

Learn more about encryption here-

https://brainly.com/question/17017885

#SPJ4

2 tools that can be used to encrypt email content are

Answers

Two tools that can be used to encrypt email content are ProtonMail and Virtru.

ProtonMail is a secure email service that encrypts all email content, both in transit and at rest, using end-to-end encryption. This means that only the sender and recipient can read the email, and not even ProtonMail has access to the content. Virtru is another tool that can be used to encrypt email content. Virtru allows users to easily encrypt emails and attachments with strong encryption, control access to their content, and revoke access if necessary. Both of these tools are great options for individuals and businesses looking to secure their email communications and ensure that their content is loaded securely.

learn more about encrypt email here:

https://brainly.com/question/31601147

#SPJ11

Which portion of the Outlook interface contains commonly accessed commands that a user will require frequently
and is able to be customized by the user based on their particular needs?
Quick Access toolbar
ribbon and ribbon tabs
Tell me box
Title bar

Answers

Answer:

A

Explanation:

on edge 2021

acess labeling windows​

acess labeling windows

Answers

Answer:

I got the same thing

Explanation:

What is binary ????????

Answers

Binary (or base-2) a numeric system that only uses two digits — 0 and 1. Computers operate in binary, meaning they store data and perform calculations using only zeros and ones. A single binary digit can only represent True (1) or False (0) in boolean logic.1. Binary is a base-2 number system invented by Gottfried Leibniz that is made up of only two numbers: 0 and 1. This number system is the basis for all binary code, which is used to write data such as the computer processor instructions used every day.

Answer:

it is a numeric system that only uses two digits 1 and 0, computers can operate using binary meaning they store data and perform calculations only using 0 and 1

Describe three key benefits of incorporating robotics in manufacturing processes (6 marks) ​

Answers

Answer:

Incorporating robotics in manufacturing processes offers several benefits. Firstly, it increases productivity by automating repetitive and time-consuming tasks. Secondly, it improves product quality by reducing the likelihood of human error and ensuring consistency in production. Finally, it enhances workplace safety by removing workers from hazardous environments and reducing the risk of accidents.

Whenever you communicate online, remember a. to delete anything you don't want to keep b. everything you put online is available forever c. to always share your personal information d. all of the above Please select the best answer from the choices provided Ο Α OB о с OD​

Answers

Answer:

B

Explanation:

i just took the test

Answer:

B

Explanation:

me brain say soo

a static method must be called with the following on the left side

a. object name
b. class name

Answers

A static method is one that has been declared static in a class. The static modifier indicates that the method belongs to the class rather than to an instance of the class.

In order to call a static method, the class name is used, followed by the method name, with no object name required on the left side.

A static method must be called with the class name on the left-hand side, rather than with an instance of the class. This is because the method is a member of the class itself rather than of an instance of the class.

Static methods are called in this way to avoid ambiguity in the code.

Answer: A static method must be called with the class name on the left-hand side, rather than with an instance of the class. This is because the method is a member of the class itself rather than of an instance of the class.

To know more about static method visit:

https://brainly.com/question/31454032

#SPJ11

what was the name of the telepresence system pioneered in the eller college of management that allowed for remote synchronous classroom instruction?

Answers

The device featured immersive touch input employing a full upper-body exoskeleton along with stereoscopic picture presentation from the remote environment. the first telepresence business to experience economic.

What kinds of telepresence systems are examples of?

Telepresence applications include managing operations on a space mission, operating surgical equipment just a few feet away, manipulating deep-sea probes remotely, and interacting with hazardous substances.

A telepresence room is what?

For the purpose of employing telepresence equipment during video conferencing, telepresence rooms are private, bookable spaces. These places are visually and acoustically private. From six to eighteen people can be accommodated in small, medium, and big rooms.

To know more about presentation visit:-

https://brainly.com/question/14896886

#SPJ1

Respond to the following questions. You can work them on papers then scan and upload it or use Math Equation Editor in Insert to type your responses directly in here. I only grade the first attempt. There will be no grades for the second or third attempts. If your response is similar or matched with any others, you and the other will both get zeros. You must include your name on each page. If I don't see your name, I might consider it is not your work and you will get a zero as well. 1. Give the function f(x)=x^2−1 a. Sketch the graph of the function. Use the graph to state the domain and the range of the function. b. Find δ such that if 0<∣x−2∣<δ, then ∣f(x)−3∣<0.2. b. Find delta such that 0

Answers

The student is required to respond to questions related to the function f(x) = x²   - 1, including sketching the graph, stating the domain and range, and finding a value of delta (δ) for a specific condition.

Please solve the quadratic equation 2x²   - 5x + 3 = 0.

In this task, the student is asked to respond to a set of questions related to the function f(x) = x²  - 1.

The first question asks the student to sketch the graph of the function and determine its domain and range based on the graph.

The second question involves finding a value of delta (δ) such that if 0 < |x - 2| < δ, then |f(x) - 3| < 0.2.

The student is required to provide their responses either by scanning and uploading their work or by using the Math Equation Editor to type their answers directly.

It is emphasized that the first attempt will be graded, and any similarities with other submissions will result in both parties receiving zeros.

Additionally, the student's name should be included on each page to ensure authenticity.

Learn more about respond to questions

brainly.com/question/31817842

#SPJ11

during the installation process for a new device, what are used in order to control how the device driver software is installed?

Answers

Device drivers control the connected peripherals and devices, enabling them to perform tasks that are specific to them. Every connected device to a computer needs a device driver to function.

What is the way the device driver software is installed?

Expand the branch associated with the device you want to install when Device Manager launches. Select Update Driver from the menu by performing a right-click on the device.

Therefore, Choose Browse my computer for drivers from the menu that appears on the next screen. Locate the files for the driver installation by clicking the Browse option.

Learn more about device driver here:

https://brainly.com/question/28902184

#SPJ1

You might create algorithms and flowcharts during the
phase of software development.
Evaluating the user's experience happens as part of the
phase of software development.
A requirements document is created during the
phase of software development.
A beta version of software is released during the
phase of software development.

testing
design
release
coding
planning
ITS TIMED PLEASE HURRY

Answers

Answer: design or code

Explanation:

Sorry if one is wrong (but I’d choose design)

An end user might create algorithms and flowcharts during the design phase of software development.

The phases of software development.

In Computer science, there are seven (7) main phases involved in the development of a software program and these include the following;

PlanningAnalysisDesignDevelopment (coding)TestingDeploymentMaintenance

During the design phase of software development, an end user might create algorithms and flowcharts. Also, the evaluation of user's experience happens as part of the testing phase of software development.

A requirements document is created during the planning phase of software development. The beta version of software is released during the testing phase of software development.

Read more on software here: brainly.com/question/26324021

The mechanical computer that included mechanisms that provided memory and an arithmetic processing unit was the:_____.

Answers

The mechanical computer that included mechanisms that provided memory and an arithmetic processing unit was the difference engine.

Established in the year 1822, the difference engine was formed as a mechanical calculator which along with performing arithmetic functions could also provide memory. This stored data could be printed out if needed.

The difference engine was established by  Charles Babbage. The difference engine also had the potential to do a series of calculations to solve a difficult arithmetical problem.

The difference engine worked on the principle of repeated additions to solve a problem. The formation of this mechanical computer was the beginning of the revolution in the computers that we see today. It was the basis following which the revolution in the technology industry began.

To learn more about mechanical computers, click here:

https://brainly.com/question/14667239

#SPJ4

write a function called is less than 10 that takes an integer and returns a boolean value, true if the integer is less than 10, otherwise false (see the sample inputs for some examples). you can pick everything about the parameter name and how you write the body of the function, but it must be called is less than 10. the code challenge will call your is less than 10 function with many inputs and check that it behaves correctly on all of them. you are not required to handle non-integer inputs to your program.

Answers

Using knowledge in computational language in python it is possible to write a code that write a function called is less than 10 that takes an integer and returns a boolean value, true if the integer is less than 10.

Writting the code:

def is_less_than_10(num):

   return num < 10

print('1<10?', is_less_than_10(1))

print('11<10?', is_less_than_10(11))

print('10<10?', is_less_than_10(10))

print('-10<10?', is_less_than_10(-10))

See more about python at brainly.com/question/18502436

#SPJ1

write a function called is less than 10 that takes an integer and returns a boolean value, true if the

This sentence is false
A. Boolean
B. Not Boolean

Answers

Based on the above scenario, This sentence is false is Not Boolean.

Is false A Boolean?

There are two boolean values. They are known to be True and False .

Note that Capitalization is vital, since true and false are not boolean values and as such, Based on the above scenario, This sentence is false is Not Boolean. because the Boolean is known to be  case sensitive as it is in small letters.

Learn more about Boolean from

https://brainly.com/question/2467366

#SPJ1

Choose the comparison operator that will create a true statement in Scratch
O
Scratch 2021
Attribution-ShareAlike
20 Generic
O
Scratch 2021
Attribution-ShareAlike
2.0 Generic
O
85
Scratch 2021
Attribution-ShareAlike
20 Generic
O
90.85
Scratch 2021
Attribution-ShareAlike
20 Generic

Choose the comparison operator that will create a true statement in ScratchOScratch 2021Attribution-ShareAlike20

Answers

Answer:

The second option

90 > 85

The statement above means 90 is more than 85 which is true.

Using a media query to adjust the design of the page elements based on the visitor's browser size is one way to achieve a design principle known as

responsive design
interactive design
customizable design
flexible design​

Answers

One technique to implement the responsive design principle is to use a media query to modify the design of the page's elements dependent on the visitor's browser size.

What three elements make up responsive web design?

The media query, the web browser, and the responsive web interface itself are the three primary parts of responsive web design.

What in UI is responsive design?

A design strategy called responsive design makes sure that a user interface adapts to the user's preferences and the device they are using. This approach doesn't assume anything about the size of the browser window, the device being used, or even the screen size.

To know more about browser visit:-

https://brainly.com/question/28504444

#SPJ1

In Row 1, RegWrite is 1, meaning the register is always written for an R-type instruction.
True
False

Answers

True, In R-type instructions, the operation is performed on registers and the result is stored in a register. Therefore, the register file needs to be written with the result, and RegWrite is set to 1 in this case.

A file is a tool used for shaping, smoothing, and removing material from a workpiece. It consists of a metal bar with a series of parallel ridges or teeth cut into one or both sides. Files come in a variety of shapes, sizes, and cuts, each designed for specific tasks such as sharpening a blade, shaping metal or wood, or removing burrs from a machined part. Files are made from different materials including high-carbon steel, diamond, or ceramic. They can be used manually with a file handle or attached to power tools for faster material removal. Proper use and maintenance of files are important for their longevity and effectiveness in achieving desired results.

Learn more about file here:

https://brainly.com/question/3911580

#SPJ11

which type of attack is wep extremely vulnerable to?

Answers

WEP is extremely vulnerable to a variety of attack types, including cracking, brute-force, IV (Initialization Vector) attack, and replay attack.

What is Initialization Vector?

An Initialization Vector (IV) is a random number used in cryptography that helps to ensure the uniqueness and randomness of data used in an encryption process. The IV is typically used as part of an encryption algorithm, where it is combined with a secret key to encrypt a message. The IV is unique for each encryption session, and must be unpredictable and non-repeating. A good IV should not be reused across multiple encryption sessions, and it should be kept secret from anyone who does not have access to the decryption key. Without a good IV, a cryptographic system can be vulnerable to attacks such as replay attacks, where an attacker can gain access to the system by repeating an encrypted message.

To learn more about Initialization Vector
https://brainly.com/question/27737295
#SPJ4

When you import excel data, you create a link to the data in the access database. group of answer choices true false

Answers

Answer:

Explanation:

True

Little Susie is trying to train her new puppy. She is trying to figure out when the puppy should get a dog biscuit as a reward. She has concluded the following:1. 1. Give the puppy a biscuit if it sits and wiggles but does not bark.2. 2. Give the puppy a biscuit if it barks and wiggles but does not sit.3. 3. Give the puppy a biscuit if it sits but does not wiggle or bark.4. 4. Give the puppy a biscuit if it sits, wiggles, and barks.5. 5. Don’t give the puppy a treat otherwise.1. Use the following:2. S: Sit (0 for not sitting; 1 for sitting)3. W: Wiggles (0 for not wiggling; 1 for wiggling)4. B: Barking (0 for not barking; 1 for barking)5. F: Biscuit function (0, don’t give the puppy a biscuit; 1, give the puppy a biscuit)Construct a truth table and find the minimized Boolean function to implement the logic telling Susie when to give her dog a biscuit.

Answers

To construct a truth table, we can list all possible combinations of S, W, and B and then determine the value of F based on Susie's rules:

S | W | B | F
--|---|---|--
0 | 0 | 0 | 0
0 | 0 | 1 | 0
0 | 1 | 0 | 0
0 | 1 | 1 | 0
1 | 0 | 0 | 1
1 | 0 | 1 | 0
1 | 1 | 0 | 1
1 | 1 | 1 | 1

Next, we can use Karnaugh maps to find the minimized Boolean function for F. The Karnaugh map for F has S and W on the top and side, respectively, and B in the middle:

\ SW | 00 | 01 | 11 | 10
----|----|----|----|----
**0** | 0  | 0  | 0  | 0
**1** | 1  | 0  | 1  | 1

From this map, we can see that F = (S AND NOT W AND NOT B) OR (S AND W AND B). This Boolean function tells Susie when to give her dog a biscuit based on its behavior.

To learn more about Boolean function, click here:

https://brainly.com/question/13265286

#SPJ11

Do know who is in my dp?​

Answers

Answer:

wut dat mean i dont understand

Explanation:

Answer:

Interested.... :-):-):-):-):-):-)

The short-range two-way communication technology behind contactless payments is called ____.

Answers

Hi there,

I hope you and your family are staying safe and healthy!

The answer is: Near Field Communication (NFC).

The short-range two-way communication technology behind contactless payments is called the Near Field Communication (NFC).

Happy to help!

~Garebear

Productivity software has been used for a number of years. Recent advancements in productivity software technology have made _____ among multiple users all over the world a possibility.

Answers

Answer:

The best and most correct answer among the choices provided by the question is the second choice.

Explanation:

Recent advancements in productivity software technology have made e-mailing among multiple users all over the world. I hope my answer has come to your help. God bless and have a nice day ahead!

pls, help it's urgent... 44 points plsssssssssssssssss

Write an algorithm and Flowchart for reversing a Number eg. N=9486.

Answers

The steps to reverse a number is given below:

The Algorithm

Step 1 Start

step 2 Read a number n

Step 3 a=n/1000

step 4 calculate b=(n%1000)/100

step 5 calculate c= (n%100)/10

step 6 calculate d = n%10

step 7 calculate reverse = a+(b*10)+(c*100)+(d*1000)

step 8 display reverse

step 9 stop

Read more about algorithms here:

https://brainly.com/question/24953880

#SPJ1

Why is it important to know the risks that exist on the Internet?

to know when to stay offline
to avoid all online threats
to prevent computer hacking
to be able to stay safe online

Answers

Answer:

D:  To be able to stay safe online.

Explanation:

Correct on quiz.

Answer:

d trust ME

Explanation:

discuss what is a trigger in database, and what is its purpose? discuss real-word application example of triggers. please do not write the sql command. provide a scenario of real-world application that you will use triggers.

Answers

A trigger is a special type of stored procedure in a database that automatically executes when an event occurs in the database.

Example of trigger :

A real-world application example of triggers is an order management system. For example, when an order is placed, a trigger can be used to automatically check if there is enough stock to fulfill the order. If there is sufficient stock, the trigger can update the inventory in the database and send a notification to the customer that the order has been successfully processed. If there is insufficient stock, the trigger can update the customer with the new delivery date. This helps to ensure that orders are fulfilled quickly and efficiently, while maintaining data integrity.

To know more about trigger
https://brainly.com/question/13384276
#SPJ4

what is the best reason for deploying directaccess connectivity for remote users?

Answers

The best reason for deploying DirectAccess connectivity for remote users is to provide seamless and secure access to internal resources without the need for a VPN.

DirectAccess offers several benefits that make it a compelling choice for remote user connectivity. Firstly, it provides seamless access to internal resources, allowing remote users to connect to corporate resources without the need for a traditional VPN client. This enhances user productivity by eliminating the manual connection process. Secondly, DirectAccess offers always-on connectivity, ensuring that remote devices are continuously connected to the corporate network whenever an internet connection is available. Thirdly, it provides a high level of security by leveraging built-in Windows technologies like IPsec and encryption to protect data transmitted between remote devices and the corporate network. Overall, DirectAccess simplifies remote access while maintaining a secure and efficient connection for remote users.

To know more about VPN click the link below:

brainly.com/question/29772999

#SPJ11

Match all the words to its definitions

Please, no links, and answer all of the 7 words to its definition.

Match all the words to its definitions Please, no links, and answer all of the 7 words to its definition.

Answers

Answer:

Explanation:

from top to bottom

1

2

7

3

4

5

6

question. answer

1.1

2.2

3.7

4.3

5.4

6.5

7.6

Other Questions
What is the size of capillary tube? have your program report to the user the three unsigned integers in the order that were entered at the keyboard, along with the sum of the three unsigned integers. you must utilize the scanf function for reading in the user input and the printf function for outputting the user input and sum of th With their motto no taxation without representation the colonists wanted to say that? please help whats the distance between -17 and 12 _______ goods are usually located close to the checkout counter because consumers will put forth a minimum level of effort to obtain them. Convenience Unsought Shopping Specialty ASAP PLS HELPQuestion 11Segn el cuento, La ofrenda de Sofia, Por qu es especial la pelota de Sofa?-Porque es Da de los Muertos-Porque se la dio su abuelo.-Porque a Sofa le encanta jugar al bisbol-Porque su hermano juega al basquetbol. HELPThe messenger RNA sequence that is most likely to produce a nonfunctional protein isA) UCA-CUC-UUA-UUU-GUU-CGA-UAU-UAAB) UGA-UAU-CGA-GGA-GUU-GCG-CUC-UAGC) UAC-UAU-CGA-GGA-GUU-GCG-CUC-AUGD) AUG-UAU-CGA-GGA-GUU-GCG-CUC-UGA 1.what process and products are essential to caregivers assessment? What, if anything, have adoption studies taught us regarding the relationship between heredity and personality I don't know if I'm right or not. I think it's C, but I'm not too sure. A tree's shadow is 4.8 meters long on level ground, as shown. The angle of elevation from the tip of the shadow to the sun is 50. Based on this information, what is the approximate height of the tree? Write a trig equation, show your work and pick your answer. A. 3.1 m B. 3.6 m C. 5.7 m D. 7.5 m how did the stock market activity on october 29, 1929 contribute to the great depression A regular-size box of cereal measures 312 inches by 812 inches by 15 inches. The manufacturer also sells an individual-size box that has a volume that is 110 of the volume of the regular-size box. What is the volume of the individual-size box of cereal Melting point of 20 g of ice 1, W 2, Y 3,Z 4,X which one is it, brainly wants me to type 20 letters : Nhn nh ng sai cc cu pht biu sau v gii thch ngn gn cu pht biuca bna. Bin s linh hot nht trong phi thc marketing l sn phmb. M hnh nh gi ca in thoi Iphone l nh gi thm nhp.c. Trong cu trc knh cp 1 th c s xut hin ca trung gian bn s gia nh sn xut v ngitiu dng cui cngd. Chin lc nh gi ht vng c ngha trong iu kin cung ln hn cue. Quan h cng chng(PR) c chc nng xy dng hnh nh thng hiu tt hn qung co He whom love touches not walks in darkness meaning Evaluate the iterated integral 22x+yz(x + y)dzdydx can you help me on this please when troubleshooting a problem within a commercial property, what group of people should you leverage for help?