• 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

1 vote
1 answer 3 views
Problem: What is the function of sentinel in Java?
asked 5 days ago PkGuy 23.5k points
0 votes
1 answer 8 views
Problem: I tried by past 1 Week to short out from this problem, but j can't able to, that's why I am posting here if anyone know it's answer then please answer me.
asked Apr 3 niyatiry 3.9k points
0 votes
1 answer 26 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 Feb 25 Code Learner 9.8k points
0 votes
1 answer 119 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 67 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 216 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
0 votes
1 answer 15 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 16.2k points
1 vote
1 answer 420 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 396 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 204 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