Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Programming Exercises in C: Solutions and Explanations

1.   Write a program that uses defined constants for the vowels in the alphabet and
      memory constants for the even decimal digits (0, 2, 4, 6, 8). It then prints the
      following three lines using literal constants for the odd digits.

 

a          e          i           o          u

0          2          4          6          8

1          3          5          7          9

 

[20 marks]

 

2.   Write a program that defines five integer variables and initializes them to 1, 10,
     
100, 1000 and 10000. It then prints them on a single line separated by space
     
characters using the decimal conversion code (%d), and on the next line with the
     
float conversion code (%f).

[20 marks]

 

3.   Write a program that extracts and print the second rightmost digit of the integral

portion of a float.

[20 marks]

 

4.   Write a program that calculates the area and perimeter of a rectangle from a

user-supplied (scanf) length and width.

[20 marks]

 

 

 

5.  Explain what is meant by the statement “a function should do only one thing.”

[3 marks]

 

support
close