Write main functions to test and debug function

Assignment Help Business Economics
Reference no: EM13892143

Write main() functions to test and debug each function, using gets() and puts() for string input and output as follows:

A) To demonstrate strlen(), input your first name using gets() and use printf to print the string followed by the number of characters in the string. An input of "Ken" would print 3. Show this with 3 string input examples.

B) To demonstrate strcpy(), input your first name using gets(s1) and use strcpy() to copy it to a second string, s2 and print both strings with puts(). So an input of "Ken" would print: "string1 = Ken string2 = Ken".

C) To demonstrate strcat(), use gets() to input your first name, last name, and Red ID as three separate strings, print them out, one per line, concatenate the three strings, and then use puts() to print out Hello followed by your name and Red ID. If the three input strings entered are "Ken" "Arnold" and "876543210", then it should print:

Reference no: EM13892143

Questions Cloud

What would your strategy be on broadcasting : Why do you think the English Premier League has historically charged different prices for broadcasting rights in different European markets? If you were running the English Premier League what would your strategy be on broadcasting?
Two factors of production-capital and labor : Countries A and B have two factors of production, capital and labor, with which they produce two goods, X and Y. Technology is the same in the two countries. X is capital- intensive; A is capital-abundant. Analyze the effects on the terms of trade an..
Investment is function of the level of income : The term dI/dY relates to the investment multiplier, while the term dY/dI has to do with whether investment is a function of the level of income. (Note: interpret the "d" to represent "delta" or "change in.") True False
What happens to consumer surplus in the market for lemons : Suppose there is an early freeze in California that reduces the size of the lemon crop. What happens to consumer surplus in the market for lemons?
Write main functions to test and debug function : Write main() functions to test and debug each function, using gets() and puts() for string input and output as follows: To demonstrate strlen(), input your first name using gets() and use printf to print the string followed by the number of character..
Consider the utility of wealth function : Consider the following utility of wealth function: U(W) = 25*W0.3 You currently have $10,000. There is an 8% chance that you get sick, in which case you lose half of your wealth ($5,000). What is your expected wealth? What is your expected utility?
What ways could sherman have changed the interview : A small group of dockworkers in California, working for Topside Industries, an international shipping company, was being investigated concerning its involvement in a theft. The theft itself was a rather simple operation. The chapter identifies some o..
Internalized by the student in the form of higher wages : Suppose that an MBA degree creates no externality because the benefits of an MBA are internalized by the student in the form of higher wages. If the government offers subsidies for MBAs, then which of the following statements is correct?
Property is non-residential real property : You purchased a commercial building and lot for $400,000 on April 15th of 2010. The lot itself was valued at $80,000 when purchased. You sold the lot and building on September 15th of 2015. Use MACRS depreciation and note this property is non-residen..

Reviews

Write a Review

 

Business Economics Questions & Answers

  What are southwest airline political company

What are Southwest Airline's Political, Economical, Social, Technical, Legal, and Environmental Issues currently facing the company?

  Velocity remains constant and the money supply increases

Velocity remains constant at 8 and the money supply increases from $200 billion to $300 billion. If real GDP increased by 10?%, then the price level increased by __ ?%?

  What is the total present worth of the savings

A company expects to achieve cost savings of $4,500 the first year and amounts increasing by $800 each year for the next 5 years. At an interest rate of 10% per year, what is the total present worth of the savings?

  Complete the columns for to conclude the profit maximizing

Complete the columns for to conclude the profit maximizing output for this firm. Draw the relevant graph to show the profit maximizing output.

  Qsuppose you elasticity of demand for your parking lot

q.suppose you elasticity of demand for your parking lot spaces are -0.5 and price is 20 per day. if your mc is zero

  Determine the borrowing rate of return

Consider a project that will bring in upfront cash inflows for the first two years but require paying some money to close the project in the third year. A0 = $ 6,500 A1= $ 4,500 A2 = $ -13,000 This is a simple borrowing project. Determine the borrowi..

  Important expenditure programs of the federal government

List the three most important expenditure programs of the federal government. How do these differ from the three most important expenditure programs of state and local governments? Explain why it makes more sense for the federal government to purchas..

  Calculate the welfare loss compared to competitive outcome

Calculate the profit maximizing labor demand and the resulting wage paid for the monopsonistic firm. Calculate the welfare loss compared to the competitive outcome.

  Describe how market power prevents optimal outcomes

Outline some poly options for government intervention. Describe how market power prevents optimal outcomes. Explain how externalities distort market outcomes. Explain how the economic growth is measured.

  What rate of return did the company make on this product

Val-lok industries manufacture miniature fittings and valves. Over a period of 8 years, the costs associated with one product line were as follows: initial investment cost of $22,000 and annual costs of $20,000. Annual revenue was $24,000. What rate ..

  What is the break-even unit volume for product line

Hamsung , Inc., a manufacturer of electronic appliances, estimated the unit cost of one of its products as follows: Material costs $ 63 Labor costs $ 24 Overhead $110 $197 The overhead cost is made up of $50 per unit variable costs and $60 per unit f..

  After-transfers family income is the sum

According to the human skills theory of comparative advantage, developing countries would be expected to have a(n). After-transfers family income is the sum of

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd