how do i print the output that is relevant to the pin code?

You have this output because strstr find 2233 in the two lines. Bilal Khan,1111111111111,1122,1000,1122334 contains 2233. For this example you can replace pinFound = strstr(line, "2233"); by pinFound = strstr(line, ",2233,"); for test purpose, but the correct solution would be to use something like regexp.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top