Question

A(n) ______ is a special value that marks the end of a series of values.

Solution

Verified
Answered 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
Continue with GoogleContinue with Facebook

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

More related questions

1/4

1/7