What is the basic structure of a C++ program?
There are three parts in the structure of c++ program
1) libraries part :
In this part, where there is libraries section part where we include the libraries part, so that we can use the all the fucntions in the main sections part
#include <iostream> where we can see the cout and the cin functions that are used in the main functions
using namespaces std;
2) main function part :
Where the main function and the operating system will be calling the main fucntions, so that no one has to call the main functions from the inside, where the execution starts in the function.
3) body of the main function part :
In the main function there is the body part which there is the { } so that we write the statements inside the main function part like cout to print the statements and the cin to just read the values from the user those are called as the input and the output statements
Get Answers For Free
Most questions answered within 1 hours.