+ 1
How can I print strings
How can I print a string with space in c language. For example. Input: amal 42 Output : amal 42 and not amal42. https://www.sololearn.com/coach/57?ref=app https://code.sololearn.com/c9zTX0slAzDb/?ref=app
3 Antworten
+ 2
Hima
This is actually a problem solving in sololearn and the case test are incorrect because of it doesn't respect the space.
So in the output it should print the spaces.
+ 2
Martin Taylor You are correct. I forgot to make it for alphanumeric .
+ 1
scanf("%[a-zA-Z ]",str);
Use this to input strings with spaces .
Here's a guide to scanf
https://code.sololearn.com/cqCvRaufP2m4/?ref=app