Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 86,259 C++ Programmers. There are 1,977 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a C++ Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

sentinel

 
Reply to this topicStart new topic

sentinel, can you explain me in detail the concept of sentinel

apar
post 6 May, 2008 - 10:25 PM
Post #1


New D.I.C Head

*
Joined: 6 May, 2008
Posts: 1



biggrin.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


KYA
post 6 May, 2008 - 11:07 PM
Post #2


DIC DIC DIC DIC DIC DIC DIC DIC DIC DIC DIC DIC DIC DIC DIC DIC

Group Icon
Joined: 14 Sep, 2007
Posts: 1,318

You mean a sentinel value?

A sentinel value is one that is used to break out of a loop of some sort. Like a flag condition to give the programs a heads up of what to do next.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

born2c0de
post 8 May, 2008 - 07:05 AM
Post #3


printf("I'm a %XR",195936478);

Group Icon
Joined: 26 Nov, 2004
Posts: 3,298

If you're talking about Sentinel Search, this method appends the value to be searched at the end of the array.
If the value is found before the end of the array, it indicates that the value is present in the array whereas if it encounters the value at the end of the array it means that the value to be searched is not present in the array.

The Sentinel Search is usually used in Embedded Systems as you don't need a loop counter to keep track of the location of the loop-iterator within the array.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
Time is now: 5/16/08 10:03AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month