I know how to search for strings in C. I use a for loop then a strstr function to determine if there is any occurrences. But now I have int numbers than i want to search for. I did find couple of examples on internet but all those search for the exact number, which I dont want.
I need to search like “20” and if there is a number “2010” it should display it.
How can I do that in c?
Maybe I’m missing the point… but why not just keep using strstr?
I need to search like "20" and if there is a number "2010" it should display it.That’s what you want it to do right?
EDIT: