0

Why i dont have output???

https://code.sololearn.com/c40VX60hIQEg/?ref=app Hey i need to print size of array

21st Jul 2021, 6:19 PM
Olka Berkovich
Olka Berkovich - avatar
3 Respuestas
+ 1
Yeah in line number 10 in for loop u written 1 and in Second loop u incrementing value of s which is correct but in first loop Put value and do dry run how first one working . You can do s++ for(i= 0; *(s++)!='\0'; i++) ;
21st Jul 2021, 6:48 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Line 10: You used ( s + 1 ) where you should be using ( s + i ) //for(i= 0; *(s+1)!='\0'; i++); for( i = 0; *( s + i ) !='\0'; i++ );
21st Jul 2021, 6:29 PM
Ipang
+ 1
Thanks a lot guys!
21st Jul 2021, 8:31 PM
Olka Berkovich
Olka Berkovich - avatar