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

  Compute the equilibrium interest rate by setting

Compute the equilibrium interest rate by setting the overall demand for money equal to the overall supply of money.

  Qthe blair companys three assembly plants are located in

q.the blair companys three assembly plants are located in california georgia and new jersey. previously the company

  Calculation of gdp

An apparel manufacturer purchases cotton and other raw materials for the production of shirts. Would the sale of cotton from a cotton mill to the shirt manufacturer be included in the calculation of GDP? Why or why not?

  Explain the entities affected by industrial regulation

Explain the entities affected by industrial regulation in terms of market structure. Explain why industrial regulation affects those entities you identified.

  Q1 referring to the output and substitution effects explain

q1. referring to the output and substitution effects explain why an increase in the wage rate for autoworkers will

  Decide to open an individual retirement account

You decide to open an individual retirement account (IRA) at your local bank that pays 8 percent/year compounded annually. At the end of each of the next 40 years, you will deposit $4000 into the account. Three years after your last deposit, you will..

  Elucidate the dividend yield for each of these four stock

Elucidate the dividend yield for each of these four stock. What is the expected capital gains yield. Discuss the relationship among the various return that you find for each of these stocks.

  Explain how does capital help human productivity

Explain how does capital help human productivity in relation to farm labor, office help, teaching, or government administration.

  What is the total debt of the government at the end of year

A government starts off with a total debt of $3.5 billion. In year one, the government runs a deficit of $400 million. In year two, the government runs a deficit of $1 billion. In year three, the government runs a surplus of $200 million. What is the..

  Relationship among the marginal cost also average variable

argue the relationship among the marginal cost also the average variable cost also among marginal cost also average cost.

  Which of the principles is at work here

After the first course in biology or chemistry, many decide to major in something other that the natural sciences. which of the 12 principles is at work here?

  What are the corn prices for those years in real

The average corn price received by farmers in 1950 was $1.52 and in 2014 it was $4.11. The Consumer Price Index (CPI) with a base period of 1982 through 1984 were 24.1 and 236.7 for the same years, respectively. What are the corn prices for those yea..

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