Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Create a program called dataExercise.c that declares the following variables and displays their values:

  1. Declare a character variable with value 'a', and display the character using printf with a %c format. Then add a second printf that displays the characater with a %d format.
  2. Declare a short int variable with a value set to the maximum value of a short int (the maximum value for whatever machine I happen to use to grade your assignment - so use the correct limits.h constant). Display the value using printf with a %d format.
  3. Declare a double variable with a value set to positive infinity. Display the value using printf with a %f format.
  4. Prompt the user and accept the following 4 types of values from a single input line: char int char float
  5. Display the values that were read in (4)
  6. Prompt the user and accept the following types of values from a single input line: char float int char
  7. Display the values that were read in (6)
  8. Prompt the user and accept an integer value
  9. Display the value read in (8) in a right-justified field of width 15, with leading zeroes
  10. Prompt the user and accept a float value
  11. Display the value read in (10) in a right-justified field of width 15, with 2 decimal points of precision, and leading spaces.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9901695

Have any Question?


Related Questions in Computer Engineering

Question in ruby as in java 8 or scala an interface mix-in

Question : In Ruby, as in Java 8 or Scala, an interface (mix-in) can provide method code as well as signatures. (It can't provide data members; that would be multiple inheritance.) Explain why dynamic typing makes this f ...

If no payments are made a loan of amount 44000 would

If no payments are made, a loan of amount $44000 would increase to $49103.89 after 2 years of monthly compounding interest. If instead, payments of $718.87 are made at the end of each month, how many years would it be un ...

Dud bolt is preparing for the boonta eve classic speeder

Dud Bolt is preparing for the Boonta Eve Classic speeder race and has to make a decision about which racer to bet on. He has calculated his potential payoffs and narrowed it down to two racers shown in the following tabl ...

Suppose mpc is 07 government spending increases by 10

Suppose MPC is 0.7. Government spending increases by $10 billion, and taxes decrease by $5 billion. How would the following items change, and by how much? Disposable income Private saving Public( Government) saving Equil ...

Innbspmid-2009 rite aid hadnbspccc-ratednbsp20-year bonds

In? mid-2009, Rite Aid had? CCC-rated, 20-year bonds outstanding with a yield to maturity of 17.3%. At the? time, similar maturity Treasuries had a yield of 5%. Suppose the market risk premium is 4% and you believe Rite? ...

When using todays digital cameras file sizes are often

When using today's digital cameras file sizes are often saved in a format that is well over 1 Megabyte. This may be great for high definition photo reproductions but is a disaster for uploading to the web. Images on your ...

Salesthe sales department is in a unique position customers

Sales The sales department is in a unique position: customers seek out Thermo-Chem because it has cornered the market with virtually no competition except in the chemicals market. Therefore, only limited sales effort is ...

A manager has a 250 million portfolio that consists of 40

A manager has a $250 million portfolio that consists of 40% stock and 60% bonds. The beta of the stock position is 1.4. The modified duration of the bond position is 5. The manager wishes to achieve an effective mix of 7 ...

Is it okay too copy a fellow classmate programming code

Is it okay too copy a fellow classmate programming code when you are stuck? Will that break a school honesty policy? Please explain

1 select one of the topics listed below and discuss

1. Select one of the topics listed below and discuss it. Describe an application that you have to solve by using at least 2 Excel functions. It can be Math, Statistics, Engineering, Financial, etc. Explain what Excel fun ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As