[SOLVED] COMP1400 Assignment 4

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (4 votes)
  1. 2 (p. 155) 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

  1. 7 (p. 158) 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).
  2. 3 (p. 177) 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.
  3. 4 (p. 177) (C99) Repeat Q4.3, but this time use a designated initializer. Make the initializer as short as possible.
  4. 3* (p. 178) 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. Save the flowchart in a file named as a4 repdigits.rap, and submit the file as your solution to this question.
  5. 3 (p. 178) Write an equivalent C program that accomplishes what the flowchart a4 repdigits.rap does, and save the program as a4 repdigits.c for online submisssion.
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.