+ 1

string strstr() function

https://code.sololearn.com/c0A25a10a6a2 Question: 8.11 Write and test the strstr() function. output from codeblocks: Enter a sentence: Use your brain and heart Enter the string that you want to find: brain Last position of brain in " Use your brain and heart " is 10 Can someone explain the line 10 and 20 the conditions i.e *s2 == 0 and *(p2+1) == 0 ?

28th Apr 2021, 9:37 PM
Ramisa Fariha
Ramisa Fariha - avatar
1 Resposta
+ 2
@Martin Thank you so much for explaining
29th Apr 2021, 6:39 AM
Ramisa Fariha
Ramisa Fariha - avatar