Question: Question 3 [ 1 5 marks ] A . Give two examples that demonstrate the difference between the break and the continue keywords when used

Question 3[15 marks]
A. Give two examples that demonstrate the difference between the break and the continue keywords when used in the block of a loop.
[2 Marks]
B. Which loop in C++ executes the code block at least once?
[1 Mark]
C. Which type of loop is used when the number of iterations is known beforehand?
[1 Mark]
D. Give an example of a "function signature" in C++?
[1 Mark]
E. Write a program that displays numbers from 1 to 10. The program should ask the user to enter a number between 1 and 10, this number would be used to print stars (**) next to any number that is divisible (has no remainder) by the entered number. Below shows examples of input and output for this program:Please code your solution so that it will only accept valid entries and will not crash on invalid entries. [10 Marks]
Question 4[15 marks]
A. In an 8-bit binary system give the value of -88 in the following:
i.2's complement representation
10101
0-2's
ii. Sign-magnitude representation
S
iii. 1's complement representation
()2
[6 Marks]
B. The IEEE-754 standard for 32-bit Single-Precision Floating-point number representation is the industry standard for representing real numbers in modern computer systems, where the 32-bits are broken down into 3 parts, 1 bit is the sign bit, 8 bits is the exponent (bias 127 and 23 bits is the mantissa. Working must be showed.
i. Show the binary representation of -65.75, using the IEEE-75432-bit SinglePrecision. [6 Marks]
ii. Show the hexadecimal representation of the above answer. [3 Marks]
Question 3 [ 1 5 marks ] A . Give two examples

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!