+ 1

Explain why the following code prints the message “Hello world” instead of giving an error?

char arr[] = “Hello world”; cout<< arr;

11th Feb 2017, 7:15 AM
Muhammad Hamza
Muhammad Hamza - avatar
2 Respuestas
+ 2
Don't you think it is basically because of the cstring library
11th Feb 2017, 8:01 AM
Muhammad Hamza
Muhammad Hamza - avatar
+ 1
Because a string is a char array.
11th Feb 2017, 7:56 AM
ChaoticDawg
ChaoticDawg - avatar