3. Write the following C program as is: #includ inx main (void) { int x =...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. Write the following C program as is: #includ <stdo.h> inx main (void) { int x = 3; y = 4, z; double p 4, c, d d = x + y; c = x / (P - Y); printf (The value of d is %d"\n", d) return (0); Compile the program. This program contains syntax errors. Indicate each one of them and make the appropriate corrections. Compile and build the program with all the corrections made. Once the syntax errors have been corrected, there are two errors that remains when you try to run it (one is called a runtime error because you are trying to do something illegal, the other is a logic error because you made a small mistake in the program). What are they? Tell your TA or ask for hints! Correct the errors and compile and run the program again. What value of d is displayed? 3. Write the following C program as is: #includ <stdo.h> inx main (void) { int x = 3; y = 4, z; double p 4, c, d d = x + y; c = X / (P - Y); printf (The value of d is d"\n", d) return (0); Compile the program. This program contains syntax errors. Indicate each one of them and make the appropriate corrections. Compile and build the program with all the corrections made. Once the syntax errors have been corrected, there are two errors that remains when you try to run it (one is called a runtime error because you are trying to do something illegal, the other is a logic error because you made a small mistake in the program). What are they? Tell your TA or ask for hints! Correct the errors and compile and run the program again. What value of d is displayed? 3. Write the following C program as is: #includ <stdo.h> inx main (void) { int x = 3; y = 4, z; double p 4, c, d d = x + y; c = x / (P - Y); printf (The value of d is %d"\n", d) return (0); Compile the program. This program contains syntax errors. Indicate each one of them and make the appropriate corrections. Compile and build the program with all the corrections made. Once the syntax errors have been corrected, there are two errors that remains when you try to run it (one is called a runtime error because you are trying to do something illegal, the other is a logic error because you made a small mistake in the program). What are they? Tell your TA or ask for hints! Correct the errors and compile and run the program again. What value of d is displayed? 3. Write the following C program as is: #includ <stdo.h> inx main (void) { int x = 3; y = 4, z; double p 4, c, d d = x + y; c = X / (P - Y); printf (The value of d is d"\n", d) return (0); Compile the program. This program contains syntax errors. Indicate each one of them and make the appropriate corrections. Compile and build the program with all the corrections made. Once the syntax errors have been corrected, there are two errors that remains when you try to run it (one is called a runtime error because you are trying to do something illegal, the other is a logic error because you made a small mistake in the program). What are they? Tell your TA or ask for hints! Correct the errors and compile and run the program again. What value of d is displayed?
Expert Answer:
Answer rating: 100% (QA)
The given C program contains multiple syntax errors that need to be fixed before it can be successfully compiled Lets go through them step by step 1 T... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
2. [10 marks] NewCo Software Company is building a new application. The table below summarizes the major activities in the project. As the company is a startup, employees can perform any function:...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Matheny Inc. went public 3 years ago. The board of directors will be meeting shortly after the end of the year to decide on a dividend policy. In the past, growth has been financed primarily through...
-
You have recently been hired as the management accountant for Delta Technologies, Inc. The company produces a broad line of subassemblies that are used in the production of flat-screen TVs and other...
-
In Problem (A) Find the average value of each function over the indicated interval. (B) Use a graphing calculator to graph the function and its average value over the indicated interval in the same...
-
Mega Millions is a multistate lottery in which players try to guess the numbers that will turn up in a drawing of numbered balls. One of the balls drawn is the Mega Ball. Matching the number drawn on...
-
Refer to the information pertaining to Endless Mountain Company that is provided in Integration Exercise 16. In addition to the budget schedules that you prepared in Integration Exercise 16, insert a...
-
QUESTION 6 There are several international treaties, conventions, protocols, and principles agreements that many governments have subscribed to in recent years. Protections and rights are also...
-
Can you make the journal entries for the transactions below: Dec. 1 - Sold merchandise to Argem Day Care Center for P20,000 and received a 3-month, 12% note. 2 - Purchased merchandise from Stephen...
-
Consider a project with free cash flows in one year of $130,999 in a weak market or $195,468 in a strong market, with each outcome being equally likely. The initial investment required for the...
-
Classify the following goods in terms of their own-price elasticity: (elastic, inelastic, unit-elastic, perfectly elastic, and perfectly inelastic) (a) Emergency Air Travel = 0.1. (b) Recreational...
-
Henrietta's Pine Bakery Corporation would like to raise $75 million to finance its expansion into new markets. The company will sell new shares of equity via a general cash offering to raise the...
-
A consumer chooses between a public good X and a private good Y . The utility function that characterizes the preferences of this consumer is U = X 3/4 Y 1/4. What is the relative price of X if the...
-
Create a marketing plan for Darden Restaurants and a hypothetical launch of a food delivery service exclusive to their restaurants. Among their direct competitors would be Uber Eats, Door Dash,...
-
Discuss the benefits of a public company vs a private company. Explain the process in determining if the company should buy or lease its new building. As an investor, when would convertible preferred...
-
111. Which of the following is correctly matched regarding adulterants: a. Ergotism: crotolaria seeds b. Endemic ascites: Argemone oil c. Epidemic dropsy: claviceps pupura d. None of these
-
How has the too-big-to-fail policy been limited in the FDICIA legislation? How might limiting the too-big-to-fail policy help reduce the risk of a future banking crisis?
-
Mark owns his home and has a $250,000 mortgage related to his purchase of the residence. When his daughter went to college in the fall of 2012, he borrowed $20,000 through a home equity loan on his...
-
Van makes an investment in a partnership in 2012. Van's capital contributions to the partnership consisted of $30,000 cash and a building with an adjusted basis of$70,000, subject to a nonrecourse...
-
Lisa Sizemore, a taxpayer in the 10-15 percent tax bracket, purchased stock as an investment on July 11, 2011. She sold the stock on July 9, 2012, 2 days before qualifying for the long-term holding...
-
Winfred Metal Reclamation Ltd, a small company, buys scrap metal residues from local companies and treats the residues to recover the metal which is then sold to other local companies. The company is...
-
What financial statements must be prepared?
-
Mainbrace Ltd is a book publisher and retailer which trades via the Internet. The company was formed using a kit bought from a legal stationer, start up capital was provided by the major shareholder,...
Study smarter with the SolutionInn App