+ 2
I don't know whats wrong,can anyone help?
/*Taking an input from the user(full name) and printing it's Abbriviated form*/ https://code.sololearn.com/c30F456EUd9i/?ref=app
8 Answers
+ 1
On your print statement, instead of %s use %c
Line 12
+ 2
Line 12, d[50] is out of range. Indexing starts from 0, so the max value you can put is 49. But I don't think that is what you want. I assume you want to print the last one as a whole. So, just delete the bracets of variable d
https://code.sololearn.com/cU8kcBYk49Nx/?ref=app
+ 1
format specifiar??where,can you please fix the code and explore whats happening
+ 1
Line 12 You still have %s instead of %c plus you have d[50] instead of d[0]
0
%c
0
i did actually,still they won't give me any answer i am looking for..can you check running it?
0
char ch[50] declars an array of characters
%c is to print a single character
%s is to print an array of characters
0
yeah it is,it is the worst i came across for now