Related questions with answers
Question
A(n) ______ is a special value that marks the end of a series of values.
Solution
VerifiedAnswered 1 year ago
Answered 1 year ago
sentinel
In the case of a string, the sentinel is '\0'.
Let's read a string str, character by character till the end of the file: Variable i will keep a count on the number of characters.
int i=0;
while(str!='\0')
{
cout<<str[i];
i++;
}
Create an account to view solutions
By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Create an account to view solutions
By signing up, you accept Quizlet's Terms of Service and Privacy Policy
More related questions
1/4
1/7