Skip to content
← Back to Community
Find a Solution
Profile icon
OmPrakash6

A random ASCII character is received every 100ms. We need to find a sequence of "GLROX" characters. There can be other characters in between! Once found- call a Found function and wait for the sequence again, if not found then wait until this sequence is found. If a new character does not come in 2 seconds call Timeout function and wait for the whole "GLROX" again even if previously received part of the sequence. The Process function which is your entry point is called every 100ms.Write a code in C

Voters
Profile icon
DixithaNR
Profile icon
ManmohanKinthal
Profile icon
Soualemmouhssin
Profile icon
AyachAchraf
Profile icon
SurajMagadum
Profile icon
Ahmad-AmrAmr
Profile icon
Amarjith
Profile icon
SanthoshG1
Profile icon
PeradaP
Profile icon
Nico3478
Comments
hotnewtop
Profile icon
Ahmad-AmrAmr

what is the answer for this problem?

Profile icon
mwilki7

is this a question?

Profile icon
OmPrakash6
Profile icon
mwilki7

Does the code in the question use something along the lines of:

char *buf while (socket.read(buf) != NULL) { // other stuff here }

?