samedi 7 août 2021

Confused about the cout operator behavior with string and int

I ran this particular code


using namespace std;

int main()
{
    cout<<(3 + "Hello World");

    return 0;
}

The output is llo World

I am pretty confused why I am getting this output, can anyone please care to explain.

Aucun commentaire:

Enregistrer un commentaire