0

Pleade Explain output of this code int main() { cout <<1+"hello"; return 0; }

C++

1st Nov 2019, 10:23 AM
Somvir Dhaka
Somvir Dhaka - avatar
2 Respuestas
+ 2
It is similar to a problem in C. printf (6+"hello world"); It will print world because we have specified the index before. I mean that everything from 6th index will be printed. Similarly in your case "ello" will be printed because the index specified is 1.
1st Nov 2019, 10:35 AM
Avinesh
Avinesh - avatar
+ 2
Thanks bro u r great
1st Nov 2019, 10:41 AM
Somvir Dhaka
Somvir Dhaka - avatar