Computer Science - Object Oriented Programming Using C++ - Discussion

Discussion Forum : Object Oriented Programming Using C++ - Section 7 (Q.No. 30)
30.
The string HELLO WORLD needs
11 bytes
12 bytes
10 Bytes
8 bytes
None of the above
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
8 comments Page 1 of 1.

Swasti said:   1 decade ago
B should be the awswer if there is space.

Omar Othman said:   1 decade ago
The corrent answer is B, because of the space and the NULL character at the end of the string.
(2)

Ade said:   8 years ago
How do you calculate this? Please explain me.
(1)

Rishabh said:   7 years ago
Each character contains 1 byte" hello word"has 10 words and one byte contain space so total byte will 11.
(1)

Samrat said:   6 years ago
Does String length in CPP starts with 1 or 0 if it's 1 then 11 bytes is true.

Aleksandr said:   4 years ago
According to me, it should be;

'h' 'e' 'l' 'l' 'o' ' ' 'w' 'o' 'r' 'l' 'd' '\0'
1 2 3 4 5 6 7 8 9 10 11 12.

Mohit Gupta said:   2 years ago
B should be the answer because null is also there.

Am I right?
(2)

Mohan Siddhardha said:   2 years ago
In C++, the answer is 12 bytes. But in Python, the answer is 11 bytes. Am I correct?

Post your comments here:

Your comments will be displayed after verification.