Help with program that will fork to a child process and prompts the user for two input numbers. Then child process need to test for and return if any of the following signals are encountered: 1) floating-point division by 0, 2) floating-point overflow, 3) integer division by 0, 4) integer overflow First start by asking the user for two floating point values, following steps: The program need to divide the first input number by the second input number and display the result, if a floating-point division by 0 occurs, program need to send the signal back to the parent and display an appropriate message. After perform multiplication the floating-point  two values and store the product in variable, then take this product variable and multiply it by 1 billion, if an overflow occurs, send the signal back to the parent and display message. After performing floating values perform the same steps with two integer values, by asking the user for two integer values.  Follow steps: divide the first input number by the second input number and display the result, if an integer division by 0 occurs, program needs to send the signal back to the parent and display an appropriate message. Then perform multiplication of two integer values and store result in some variable, take this product variable and multiply it by 1 billion, in case if overflow occurs, program needs to send signal back to parent displaying message. Write in C language.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Topic Video
Question
100%

Help with program that will fork to a child process and prompts the user for two input numbers. Then child process need to test for and return if any of the following signals are encountered: 1) floating-point division by 0, 2) floating-point overflow, 3) integer division by 0, 4) integer overflow

First start by asking the user for two floating point values, following steps: The program need to divide the first input number by the second input number and display the result, if a floating-point division by 0 occurs, program need to send the signal back to the parent and display an appropriate message. After perform multiplication the floating-point  two values and store the product in variable, then take this product variable and multiply it by 1 billion, if an overflow occurs, send the signal back to the parent and display message.

After performing floating values perform the same steps with two integer values, by asking the user for two integer values.  Follow steps: divide the first input number by the second input number and display the result, if an integer division by 0 occurs, program needs to send the signal back to the parent and display an appropriate message. Then perform multiplication of two integer values and store result in some variable, take this product variable and multiply it by 1 billion, in case if overflow occurs, program needs to send signal back to parent displaying message.

Write in C language.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education