c language do with this skeleton please atof is a function in the C programming language that
Fantastic news! We've Found the answer you've been seeking!
Question:
c language do with this skeleton please
Transcribed Image Text:
atof is a function in the C programming language that converts a string into a floating-point numerical representation. atof stands for ASCII to float. Task 1. In this part of the assignment, you are going to implement your own atof function float myAtof (char* string, char* error) that will convert an input read as a character array into a floating-point number. ✓ Your atof function will get two inputs. One for the character array to convert and the other to check for the error. The output of the function will be a floating-point number. If the character array cannot be converted (it includes letters, special characters, etc.) the error will be 1, otherwise 0. ✓ ✓ If the numbers cannot be converted (error = 1), give an error message to the user. Here are some sample outputs: Enter a number: 6 Your number is: 6.00 Process returned e (exe) Press any key to continue. Enter a number: 4.678 Your number is: 4.68 Process returned 0 (0x0) Press any key to continue. execution time: 9.563 S execution time: 5.820 s atof is a function in the C programming language that converts a string into a floating-point numerical representation. atof stands for ASCII to float. Task 1. In this part of the assignment, you are going to implement your own atof function float myAtof (char* string, char* error) that will convert an input read as a character array into a floating-point number. ✓ Your atof function will get two inputs. One for the character array to convert and the other to check for the error. The output of the function will be a floating-point number. If the character array cannot be converted (it includes letters, special characters, etc.) the error will be 1, otherwise 0. ✓ ✓ If the numbers cannot be converted (error = 1), give an error message to the user. Here are some sample outputs: Enter a number: 6 Your number is: 6.00 Process returned e (exe) Press any key to continue. Enter a number: 4.678 Your number is: 4.68 Process returned 0 (0x0) Press any key to continue. execution time: 9.563 S execution time: 5.820 s
Expert Answer:
Related Book For
Auditing and Assurance services an integrated approach
ISBN: 978-0132575959
14th Edition
Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley
Posted Date:
Students also viewed these programming questions
-
Please solve this problem using C language Hacker Industries has a number of employees. The company assigns each employee a numeric evaluation score and stores these scores in a list. A manager is...
-
Do you agree with Woods description? What advice about language use would you give to an ambitious woman making her way through a professional career in which men are in the majority?
-
Please explain and show me how to do this on Access. Thank you! I posted this question before, and the person who answered did not answer the full question and did not answer it correctly, I have...
-
Simplify each expression in Problems 722. Classify each answer by number of terms and degree. (x + 2y3z) - (x - 5y + 4z)
-
The following hypotheses are given. H0: = .70 H1: .70 A sample of 120 observations revealed that = .30. At the .05 significance level, can the null hypothesis be rejected? a. State the decision...
-
A 20 spur pinion with 20 teeth and a module of 2.5 mm transmits 120 W to a 36-tooth gear. The pinion speed is 100 rev/min, and the gears are grade 1, 18 mm face width, through-hardened steel at 200...
-
Consider the following cash flow profile and assume MARR is 10 percent/year. a. What does Descartes' rule of signs tell us about the IRR(s) of this project? b. What does Norstrom's criterion tell us...
-
Solich Sandwich Shop had the following long-term asset balances as of December 31, 2015: Solich purchased all the assets at the beginning of 2013 (3 years ago). The building is depreciated over a...
-
Assume a simultaneous open market purchase of 100 million from the Bank of England and a repayment of a discount loan of 5 million from Bank A to the Bank of England. Show the overall change in their...
-
The rod OB slides through the collar pivoted to the rotating link at A. If CA has an angular velocity = 3 rad/s for an interval of motion, calculate the angular velocity of OB when = 45. CA = 200...
-
fluid Theory: A notch is a device used for measuring the rate of flow of a liquid through a small channel or a tank. The notch be defined as an opening in the side of a tank or a small channel in...
-
Evaluate the function at 0, -3, and 2. f(x) = 5x If the answer is a fraction such as f(0) = 1 f(-3) = 125 f(2)= 25 13 please type 1/3. Or you may write it as a decimal.
-
On July 31, 2022, Jackie Corp. bought three vehicles, each with five years of useful life, costing: Vehicle 1 - 1,500,000 (assigned for use of a manager) Vehicle 2 - 1,000,000 (transferred ownership...
-
For each of the questions listed below, show your work step-by-step and explain your reasoning. (A) (1 point) Find [le, given that [w] = [1] and the basis B of R consists of b = ,b = -M and the basis...
-
Your company has several employees who are working along a conveyor line to clean up an over spill of product by manually shoveling the materials. The conveyor belt is located outdoors and will take...
-
A nutua lund was purchased on anuary 2nd 2015 when its NAV was $20.00. It was sold with a back-end load that commenced at 6% and declined by 1% for each year thereafter, with the load based on the...
-
Kevin reported several tax preference items in taxable income in 2019. The normal federal tax in 2019 was $35,000 and the alternative minimum tax (AMT) was $52,000. In 2020 Niko earned only...
-
Suppose the index goes to 18 percent in year 5. What is the effective cost of the unrestricted ARM?
-
Explain what is meant by independent checks on performance and give five specific examples.
-
Define the meaning of the term materiality as it is used in accounting and auditing. What is the relationship between materiality and the phrase obtain reasonable assurance used in the auditor's...
-
Assume that a sample of 100 units was obtained in sampling the inventory in Question. Assume further that the following three misstatements were found: Calculate adjusted misstatement bounds for the...
-
A balloon is launched at sea level, where the air pressure is \(100 \mathrm{kPa}\). The helium has a volume of \(1000 \mathrm{~m}^{3}\) at this altitude. What is the volume of the helium when the...
-
A \(20 \mathrm{~kg}\) block of aluminum sits on the bottom of a tank of water. How much force does the block exert on the bottom of the tank? Long-distance balloon flights are usually made using a...
-
Sneezing requires an increase in pressure of the air in the lungs; a typical sneeze might result in an extra pressure of \(7.0 \mathrm{kPa}\). Estimate how much force this exerts on the diaphragm,...
Study smarter with the SolutionInn App