The execution of all C++ programs begins with the main function , regardless of where the function is actually located within the code. The open brace ( { ) at line 5 indicates the beginning of main ‘s function definition, and the closing brace ( } ) at line 7, indicates its end.