#include<stdio.h>
#include<conio.h>
void main()
{
char ch[100];
int i;
clrscr();
printf(" Enter any String : ");
/* to accept multi world string gets() is used */
gets(ch);
i=0;
printf("\n%c",ch[0]);
while(ch[i]!='\0')
{
if(ch[i]==' ')
{
i++;
printf("%c",ch[i]);
}
i++;
}
getch();
}
#include<conio.h>
void main()
{
char ch[100];
int i;
clrscr();
printf(" Enter any String : ");
/* to accept multi world string gets() is used */
gets(ch);
i=0;
printf("\n%c",ch[0]);
while(ch[i]!='\0')
{
if(ch[i]==' ')
{
i++;
printf("%c",ch[i]);
}
i++;
}
getch();
}
No comments:
Post a Comment