496 views
0 votes
0 votes

here j++ executes only if s[i]==c[j] ,

and i++ executes always so

when s= “response”  after while loop i will be 8 but j will be 0

so it should be false

but given answer is- true

please tell me where i am wrong??

1 Answer

0 votes
0 votes

Answer: False, False

It would have been True, True if

if(s[i]==c[j]) i++;
        j++;

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
2
tishhaagrawal asked Dec 16, 2023
360 views
Below is my approach to solving this question, can anyone please explain if I am doing it the right way?Let X = #free slotssince, m =7 and n = 3So, $4 \leqslant x\leqsla...
0 votes
0 votes
0 answers
3
Dadu asked Dec 7, 2023
214 views
Please solve I am unable to understand the solution given by made easy