+ 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
8 Réponses
+ 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.
+ 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!
+ 1
Ok
+ 1
What happens when the person includes their title before or after their name?
Dr Jon Doe
Jane Doe MEd
0
Still not working 😭
0
Not even now the output should be A B Singh
0
Vishnu Swarnkar Check this I fixed it!