+ 1
Hi guys.. How to count length in string without space? (In C)
3 Antworten
+ 2
make your own function.
probably with a while loop and a counter. The counter would increment each time you hopped to the next character. If they character is a space, dont increment. then just return the counter
+ 2
You can store a string in a charecter array in c.
You can get array length by strlen(array);
Without space you to split array by space using strtok() function and find split words length..
Or use a for loop to traverse array and count only charecters excluding space...
You can use these ways to find length...
Hope these helps..
+ 2
I think you can iterate over the string array using for loop and use strstr function to check if the string contains some substring like "Ssss" or other animal voices.Checked if not equal to NULL the substring exists.The challenge is more easy with python than c.Space is symbolised by "\t" for tab in your case.