Get premium membership and access questions with answers, video lessons as well as revision papers.

Describe the structure of a C++ program.

      

Describe the structure of a C++ program.

  

Answers


Kavungya
A typical C++ program would contain four sections, which may be placed in separate code files and then compiled independently or jointly. The program sections are:
1. Include files
2. Class declaration
3. Member functions definitions
4. Main function program
A C++ program is commonly organized into three separate files by: placing the class declarations in a header file while the definitions of member functions go into another file. This approach enables the separation of the abstract specification of the interface (i.e. class definition) from the implementation details (i.e. member functions definition). The main program that uses the class is placed in a third file which “includes” the previous two files as well as any other files required

Kavungya answered the question on May 15, 2019 at 14:56


Next: Outline the steps in creating a C++ source file.
Previous: Explain the characteristics of a good C++ program.

View More Computer Programming Questions and Answers | Return to Questions Index


Learn High School English on YouTube

Related Questions