0% found this document useful (0 votes)
104 views4 pages

WWW W3schools Com CPP CPP - Output Asp

The cout object in C++, together with the << operator, is used to output values and print text to the console. Multiple cout statements can be used in a program to output multiple lines. However, cout does not automatically insert a new line, so multiple values will print on the same line unless a new line is included in the output.

Uploaded by

nasser
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
104 views4 pages

WWW W3schools Com CPP CPP - Output Asp

The cout object in C++, together with the << operator, is used to output values and print text to the console. Multiple cout statements can be used in a program to output multiple lines. However, cout does not automatically insert a new line, so multiple values will print on the same line unless a new line is included in the output.

Uploaded by

nasser
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

w3schools.

com LOG IN

  MORE  EXERCISES  

C++ Output (Print Text)


Previous Next

C++ Output (Print Text)


The cout object, together with the << operator, is used to output values/print text:

Example
#include <iostream>
using namespace std;

int main() {
cout << "Hello World!";
return 0;
}

Try it Yourself »

You can add as many cout objects as you want. However, note that it does not insert a new line at the end of the
output:

Example
#include <iostream>
using namespace std;

int main() {
cout << "Hello World!";
cout << "I am learning C++";
return 0;
}

Try it Yourself »

Previous Next
COLOR PICKER

LIKE US


Get your
certification today!

View options

HOW TO
Tabs
Dropdowns
Accordions
Side Navigation
Top Navigation
Modal Boxes
Progress Bars
Parallax
Login Form
HTML Includes
Google Maps
Range Sliders
Tooltips
Slideshow
Filter List
Sort List

Certificates
HTML

CSS

JavaScript

Python

SQL
PHP

And more

REPORT ERROR

FORUM

ABOUT

SHOP

Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
W 3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial

Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
W 3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
Angular Reference
jQuery Reference

Top Examples
HTML Examples
CSS Examples
JavaScript Examples
How To Examples
SQL Examples
Python Examples
W 3.CSS Examples
Bootstrap Examples
PHP Examples
Java Examples
XML Examples
jQuery Examples

Web Certificates
HTML Certificate
CSS Certificate
JavaScript Certificate
SQL Certificate
Python Certificate
PHP Certificate
Bootstrap Certificate
XML Certificate
jQuery Certificate

Get Certified »

You might also like