54. ACROMATIC STRING(PRINTING INITIALS)
void main()
{
char str[20];
int i=0;
clrscr();
puts("Enter a string");
gets(str);
printf("%c",*str);
while(str[i]!='\0')
{
if(str[i]==' ')
{
i++;
printf("%c",*(str+i));
}
i++;
}
getch();
}
No comments:
Post a Comment
Thanks to given comments.......