+ 1

What is the cout << "sum is" << sum?

Is that mean ("sum%d", a);? I only learned C... So it's little bit confuse...

20th Oct 2016, 12:02 PM
NAA RU
NAA RU - avatar
4 ответов
+ 3
It is like Printf<<"sum is"<<%d ,&sum; I actually don't remember the syntax. I learned. C. many years ago. Hope you understand from this.
20th Oct 2016, 12:06 PM
Jishnu
Jishnu - avatar
+ 3
cout << "Sum is " << sum << endl; == printf("Sum is %d\n", sum);
20th Oct 2016, 3:37 PM
Cohen Creber
Cohen Creber - avatar
+ 1
To complete what has been said: cout is the console output stream object. In C++, to print something in the console, you send stuff to cout.
20th Oct 2016, 4:20 PM
Zen
Zen - avatar
- 1
it prints sum is : a value according to the expression
22nd Oct 2016, 1:39 PM
Alexander Joy
Alexander Joy - avatar