+ 1

Initials of name

I have written a code of string manipulation in c. In this a particular section shorten long names by initials . For example Amitabh Bachchan Singh Output should be A. B. Singh But the error in my code is Output is A. B. S https://sololearn.com/compiler-playground/c74FoF9YyEEa/?ref=app https://sololearn.com/compiler-playground/c74FoF9YyEEa/?ref=app https://sololearn.com/compiler-playground/c74FoF9YyEEa/?ref=app

27th Apr 2024, 6:32 AM
Vishnu Swarnkar
8 odpowiedzi
+ 4
Vishnu Swarnkar , for future use of the `q&a` section, please mention the *programming language* you are talking about. this makes readers able to see this information in the list overview of this section.
27th Apr 2024, 5:20 PM
Lothar
Lothar - avatar
+ 2
You're calling the spaces function before it's defined or declared. And gets() doesn't perform any bounds checking, which can lead to buffer overflow vulnerabilities lead to an error. So, you should use fgets() which allows you to specify the maximum number of characters to read. These are issues you need to fixed this code!
27th Apr 2024, 7:25 AM
`ᴴᵗᵗየ
`ᴴᵗᵗየ - avatar
+ 1
Ok
28th Apr 2024, 1:03 PM
Vishnu Swarnkar
+ 1
What happens when the person includes their title before or after their name? Dr Jon Doe Jane Doe MEd
5th Jun 2024, 3:10 PM
Ipang
0
Still not working 😭
27th Apr 2024, 7:45 AM
Vishnu Swarnkar
0
Not even now the output should be A B Singh
27th Apr 2024, 8:20 AM
Vishnu Swarnkar
0
Vishnu Swarnkar Check this I fixed it!
27th Apr 2024, 11:00 AM
`ᴴᵗᵗየ
`ᴴᵗᵗየ - avatar