Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

closed What does "<<" do?

+2 votes
asked Apr 8, 2022 by userdotexe (1,340 points)
closed Apr 12, 2022 by Admin


#include <iostream>

using namespace std;

int main()
    cout << "Hello World";

    return 0;

What does << actually do?

closed with the note: answered

1 Answer

+3 votes
answered Apr 8, 2022 by Peter Minarik (89,130 points)
selected Apr 8, 2022 by userdotexe
Best answer

It is called the insertion operator and is used to insert a formatted value on an output stream. (Check the links for more details.)

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.