Question 1
Back to Exercise
How many bytes does char s[] = "Hello"; occupy?
- A 5
- B 6 Correct
- C 4
- D 8
Correct Answer: Option B
The compiler sizes the array from the literal, including the terminating '\0': 5 letters + 1 = 6 bytes. strlen(s) would be 5.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!