#include
#include
int calc(char *x)
{
int count =0;
while(*x != '\0')
{
count++;
x++;
}
return(count);
}
void main()
{
clrscr();
char *i;
char ch[30];
printf("\nPlease enter text without space:");
scanf(" %s",ch);
i=&ch[0];
printf("\n\nLenght of given String:%d",calc(i));
getch();
}
No comments:
Post a Comment