volume_mute

Various parts of a C++ program

publish date2022/09/26 12:30:00 GMT+10

volume_mute

Match certain program sections

  • (1) transparent lines from 1 to 4
  • (2) transparent lines from 11 to 14
  • (3) transparent lines from 19 to 22
  • (4) transparent lines from 23 to 26
drag and drop the selected option to the right place or type it instead
Assignment statements
Variable declarations
Comments
Output statements

Correct Answer

(1) Comments
(2) Variable declarations
(3) Assignment statements
(4) Output statements

Explanation

  • Variable declarations. A statement such as double length; instructs the system to allocate memory space and name it length.
  • Assignment statement in line 19 instructs the system to store 6.0 in the memory space length.
  • Assignment statement in line 22 instructs the system to evaluate the expression length * width and store the result in the memory space area.
  • Output statements. An output statement instructs the system to display results.

Reference

C++ Programming, 7th edition, D. S. Malik


Quizzes you can take where this question appears