charactor count wthout getche function..?
#include<stdio.h>
#include<conio.h>
void main()
{
int count=0;
printf("\n\tType any phrase");
while(getche() !=13) //13 is For enter key
{
count++;
}
printf("\nCharactor count is =%d",count);
getch()
}
out put
Type any phrase
CAT
charactor count is 3
i want to count the charactors without using the getche() function. Is there any way to make the program to count the charactors without using getche()..? if yes then please write the programmm.i shall be soo much thankful to you.
thanks in advance...