Home › Forums › C Programming › please help me in this… › Reply To: please help me in this…
September 9, 2008 at 10:39 pm
#3453
bajean
Participant
sir thanx for ur post,
yaa…its good…..but sir is it necessary to input three strings…..???
below written program will output initials of the name…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <br /> #include<stdio.h><br /> #include<conio.h><br /> #include<string.h><br /> void main()<br /> {<br /> int i,l;<br /> char name[40];<br /> clrscr();<br /> printf("enter ur name:");<br /> gets(name);<br /> l=strlen(name);<br /> printf("%c",name[0]);<br /> for(i=0;i<=l;i++)<br /> {<br /> if(name==' ')<br /> {<br /> printf("%c",name[i+1]);<br /> }<br /> }<br /> getch();<br /> } |
can u modify this one??….to get the desired output….