• Register
0 votes


I am new, I need help, can anyone help?
This is a special value that marks the end of a list of values?

7 5 3
5,380 points

Please log in or register to answer this question.

2 Answers

0 votes


As per my experience and knowledge 

The correct answer is: sentinel.


Sentinel value is a special value that is used to terminate a loop. The sentinel value typically is chosen so as to not be a legitimate data value that the loop will encounter and attempt to perform with. ... Also referred to as a flag value or a signal value.

Hope this might help you.

8 6 2
10,530 points
0 votes

Solution: we are hoping the answer of this question is sentinel value

In brief Explanation:

A sentinel is a special value that marks the end of a list of items. When a program reads the sentinel value it knows it has reached the end of the list, so the loop terminates.

In computer programming, a sentinel value (also referred to as a flag value, trip value, rogue value, signal value, or dummy data) is a special value in the context of an algorithm which uses its presence as a condition of termination, typically in a loop or recursive algorithm.

The sentinel value is a form of in-band data that makes it possible to detect the end of the data when no out-of-band data (such as an explicit size indication) is provided. The value should be selected in such a way that it is guaranteed to be distinct from all legal data values, since otherwise the presence of such values would prematurely signal the end of the data (the semipredicate problem). A sentinel value is sometimes known as an "Elephant in Cairo", due to a joke where this is used as a physical sentinel. In safe languages, most uses of sentinel values could be replaced with option types, which enforce explicit handling of the exceptional case.

For Further study go to this link https://en.wikipedia.org/wiki/Sentinel_value

10 6 4
31,120 points

Related questions

0 votes
1 answer 89 views
Problem: Can anyone help it was actually asked in exam as following and I need to know whether my answer was right or not? Write an expression that whose value is the fifth character of the String name?
asked Feb 24, 2020 maddi86 5.4k points
0 votes
1 answer 8 views
Problem: Would the following code be correct? class Person { private: string name; bool sex; int age; public: Person (); bool getSexo (); int getAge (); Person play (string s); }Hope someone could help me out?
asked Jan 25 sasha 13.2k points
0 votes
1 answer 5 views
Problem: Hello! I am trying to write a program that takes input from the user and determines whether the user entered a number, alphabet, or a special character. I am a beginner so, facing some difficulty in understanding the logic. Can somebody from here help me find out the solution? Thanks!
asked 3 days ago Code Learner 6k points
0 votes
1 answer 40 views
Problem: I am new to programming, I need help, can anyone help me? Write an expression that evaluates to True if and only if s refers to the str "end"?
asked Feb 18, 2020 maddi86 5.4k points
0 votes
1 answer 112 views
Solutions: I am new in programming and my logic is not good, can anyone give the right solution? Write an expression that evaluates to true if and only if the C-string s equals the C-string "end"?
asked Feb 14, 2020 maddi86 5.4k points
1 vote
1 answer 315 views
Problem: The maximum number of entry points that any programming structure can have is ____.? Which answer fits in the blank? A) five B) zero C) three D) one
asked Feb 19, 2020 maddi86 5.4k points
0 votes
2 answers 280 views
Problems: Can anyone give the right solution The decision structure that has two possible paths of execution is known as _____? a. Single alternative b. Double alternative c. Dual alternative d. Two alternative
asked Feb 14, 2020 maddi86 5.4k points
0 votes
1 answer 132 views
Problem: Write an expression whose value is the str that consists of the third to last character of the str associated with s I tried s[2:] didn't work. Can you please guide me with right solution?
asked Feb 19, 2020 maddi86 5.4k points
0 votes
1 answer 3 views
Problem: I am trying to write a program that calculates the average of scores in 5 subjects and prints the average and the lowest score of all. I tried the following program, but it is not given the correct average: #include<iostream> #include<conio.h> using namespace std; int ... "<<lowest; } It gives 0 as average no matter what values I input. Please guide me about what I am doing wrong. Thanks!
asked 1 day ago Code Learner 6k points
0 votes
1 answer 42 views
Problem: Hi there! I am new to the world of programming. My programming teacher gave me an assignment in which I have to write a program in which there would be a function that will take two strings as input from user and will compare the size of both strings ... the larger string of the two. I have no clue how to do that. Please provide me with the sample program with proper description. Thanks
asked Nov 25, 2020 Code Learner 6k points