Starting from:

$25

COMP1400-Assignment 4 Solved

1.  Which of the following are not legal constants in C? Classify each legal constant as either integer or floating-point.

          (a) 010E2                      (b) 32.1E+5                  (c) 0790                        (d) 100 000 (e) 3.978e-2

2.  Modify Programming Project 6 from Chapter 3 so that the user may add, subtract, multiply, or divide two fractions (by entering either +, -, *, or / between the fractions).

3.  Write a declaration of an array named weekend containing seven bool values. Include an initializer that makes the first and last values true; all other values should be false.

4.) (C99) Repeat Q4.3, but this time use a designated initializer. Make the initializer as short as possible.

5. Create a flowchart to provide a modified solution to the repdigit.c program of Section 8.1. In the flowchart, the user can enter more than one number to be tested for repeated digits. It terminates when the user enters a number that is less or equal to 0.

6.    Write an equivalent C program that accomplishes what the flowchart a4 repdigits.

More products