The line int main()is the main function where program execution begins.The next line cout << “Hello World";causes the message “Hello World" to be displayed on the screen.The next line return 0;terminates main( )function and causes it to return the value 0 to the calling process.
Subscribe to view the full document.
Program comments are explanatory statements that you can include in the C++ code that you write and helps anyone reading the source code.All programming languages allow for some form of comments.C++ supports single-line and multi-line comments. All characters available inside any comment are ignored by C++ compiler.Single Line Comment: // This is a comment //Multi Line Comment:/* C++ comments can also span multiple lines */Comments
C++ uses a convenient abstraction called streamsto perform input and output operations in sequential media such as the screen, the keyboard or a file.C++ I/O occurs in streams, which are sequences of bytes. If bytes flow from a device like a keyboard, a disk drive, or a network connection etc. to main memory, this is called input operationand if bytes flow from main memory to a device like a display screen, a printer, a disk drive, or a network connection, etc, this is called output operation.
As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.
Temple University Fox School of Business ‘17, Course Hero Intern
I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.
University of Pennsylvania ‘17, Course Hero Intern
The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.