Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
The First Program | Getting Started
C++ Introduction
course content

Course Content

C++ Introduction

C++ Introduction

1. Getting Started
2. Variables and Data Types
3. Introduction to Operators
4. Introduction to Program Flow
5. Introduction to Functions

bookThe First Program

The traditional first program in any programming language is often a simple program that outputs the message to the console.

Input and Output

The most common way to output information to the console is by using iostream library. It stands for input/output stream.

As we already know, to add library to our program we have to include it.

Character output

The cout stream is part of the iostream library and is used for standard output.

  • std::: it means that the identifier is part of the standard library, which is organized under the std namespace;
  • cout: stands for character output and is used to send output;
  • <<: it is used to insert data into the standard output stream.

Comments

Comments are used for documentation and do not affect program execution. There are two types:

  • Single-line comments: Begin with // and extend to the end of the line;
  • Multi-line comments: Enclosed between /* and */.

Task

Create a program that outputs your message.

Once you've completed this task, click the button below the code to check your solution.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 6
toggle bottom row

bookThe First Program

The traditional first program in any programming language is often a simple program that outputs the message to the console.

Input and Output

The most common way to output information to the console is by using iostream library. It stands for input/output stream.

As we already know, to add library to our program we have to include it.

Character output

The cout stream is part of the iostream library and is used for standard output.

  • std::: it means that the identifier is part of the standard library, which is organized under the std namespace;
  • cout: stands for character output and is used to send output;
  • <<: it is used to insert data into the standard output stream.

Comments

Comments are used for documentation and do not affect program execution. There are two types:

  • Single-line comments: Begin with // and extend to the end of the line;
  • Multi-line comments: Enclosed between /* and */.

Task

Create a program that outputs your message.

Once you've completed this task, click the button below the code to check your solution.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 6
toggle bottom row

bookThe First Program

The traditional first program in any programming language is often a simple program that outputs the message to the console.

Input and Output

The most common way to output information to the console is by using iostream library. It stands for input/output stream.

As we already know, to add library to our program we have to include it.

Character output

The cout stream is part of the iostream library and is used for standard output.

  • std::: it means that the identifier is part of the standard library, which is organized under the std namespace;
  • cout: stands for character output and is used to send output;
  • <<: it is used to insert data into the standard output stream.

Comments

Comments are used for documentation and do not affect program execution. There are two types:

  • Single-line comments: Begin with // and extend to the end of the line;
  • Multi-line comments: Enclosed between /* and */.

Task

Create a program that outputs your message.

Once you've completed this task, click the button below the code to check your solution.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

The traditional first program in any programming language is often a simple program that outputs the message to the console.

Input and Output

The most common way to output information to the console is by using iostream library. It stands for input/output stream.

As we already know, to add library to our program we have to include it.

Character output

The cout stream is part of the iostream library and is used for standard output.

  • std::: it means that the identifier is part of the standard library, which is organized under the std namespace;
  • cout: stands for character output and is used to send output;
  • <<: it is used to insert data into the standard output stream.

Comments

Comments are used for documentation and do not affect program execution. There are two types:

  • Single-line comments: Begin with // and extend to the end of the line;
  • Multi-line comments: Enclosed between /* and */.

Task

Create a program that outputs your message.

Once you've completed this task, click the button below the code to check your solution.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 1. Chapter 6
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt