|
Description
Another strlen example
Code
#include <stdio.h>
#include <string.h>
int main()
{
char title[100];
int characters;
printf("Please enter your desired
, no more than 6 characters.\n");
scanf("%s",&title);
/*get the amount of characters*/
characters = strlen(title);
if(characters > 6)
printf("Too many characters.\n");
else
printf("password accepted.\n");
return 0;
}
Information
tested using LCC WIn
32
|