+ 2

Why the output is this?

the code is this #include<iostream.h> main() {cout<<123456789; } And the output is 123456789

8th Feb 2018, 11:37 AM
saksham kumar sharma
saksham kumar sharma - avatar
10 Answers
+ 6
if you want to output a string what happens when you output like this? int a = 123456789; cout << a; an integer is printed to screen.
8th Feb 2018, 11:43 AM
jay
jay - avatar
+ 4
what were you expecting the output to be?
8th Feb 2018, 11:40 AM
jay
jay - avatar
+ 3
thank you so much
8th Feb 2018, 11:43 AM
saksham kumar sharma
saksham kumar sharma - avatar
+ 1
Because you output number 123456789 ;)
8th Feb 2018, 11:40 AM
Toni Isotalo
Toni Isotalo - avatar
+ 1
like this cout<<"123456789";
8th Feb 2018, 11:41 AM
saksham kumar sharma
saksham kumar sharma - avatar
+ 1
No it's not necessary. You can output integer as well
8th Feb 2018, 11:43 AM
Toni Isotalo
Toni Isotalo - avatar
+ 1
oh
8th Feb 2018, 11:43 AM
saksham kumar sharma
saksham kumar sharma - avatar
+ 1
šŸ˜’šŸ˜’
8th Feb 2018, 6:06 PM
Arun
0
but thats not in double quotes
8th Feb 2018, 11:40 AM
saksham kumar sharma
saksham kumar sharma - avatar
0
it must be in double quotes
8th Feb 2018, 11:41 AM
saksham kumar sharma
saksham kumar sharma - avatar