|
Get 9,000+ Interview Questions with Answers in an eBook
C Source Codes List | Source Code Home
Program : Program to test whether a given i/p string is of length greater than 80 chars.
#include
#include
void main()
{
char c;
int i=0;
clrscr();
printf("the string will end when ctrl+z is pressed");
while((c=getche())!=26)
i++;
if(i>80)
printf("the input string is longer than 80 characters");
else
printf("the input string is smaller than 80 characters");
getch();
}
C Source Codes List | Source Code Home
|
|
|