Ask coding questions

← Back to all posts
Find a Solution
OmPrakash6 (7)

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

Ahmad-AmrAmr (0)

what is the answer for this problem?

mwilki7 (1134)

is this a question?

mwilki7 (1134)

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

char *buf
while ( != NULL)
    // other stuff here