Tuesday 24 May 2011

Program to count characters in a Phrase

#include<stdio.h>
#include<conio.h>
void main (void)
{
 int count=0;
 clrscr();
 printf("Enter a phrase:\n");
 while(getche() != '\r')
 count++;
 printf("\n");
 printf("Total Characters are %d",count);
 getch();
}




If you have any question, you can ask me freely!

0 comments:

Post a Comment