Quiz - C-style Strings
If you haven't already done so, be sure to read through Cprogramming.com's tutorial on C-style Strings
. Otherwise, best of luck with the quiz!
Answer KeyNext lesson: Lesson 10, file I/O
1. Which of the following is a static string?
A. Static String
B. "Static String"
C. 'Static String'
D. char string;
2. What character ends all strings?
B. ' '
3. Which of the following reads in a string named x with one hundred characters?
A. cin.getline(x, 100, '\n');
B. cin.getline(100, x, '\n');
C. readline(x, 100, '\n');
4. Which of the following functions compares two strings?
5. Which of the following adds one string to the end of another?