Module: Java. Basics


Problem

4/4

The simplest program

Theory Click to read/hide

The simplest C++ program consists of only 8 characters:

main()
{
}
Explain each character in the program:
main - The main program is always called main. Moreover, the C++ programming language distinguishes between capital and small letters.

() - Empty brackets mean that main has no arguments.
{} - Curly brackets indicate the beginning and end of the main program. All actions that must be performed are written inside curly brackets.

What does our program do?
Since there is nothing inside the curly braces, our program does nothing, it simply complies with the rules of the C++ language, it can be compiled and an exe-file can be obtained - an executable file that can be launched for execution.

Problem

Run the program, make sure that the program works, but it does not display anything.