Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include<string.h>
- int checkstring_f(char *str)
- {
- int i = 0, flag = 0;
- for (i = 0; *str != 0; i++, str++)
- {
- if (*str >= 'a' && *str <= 'z')
- {
- flag = 1;
- }
- if (*str >= 'A' && *str <= 'Z')
- {
- flag = 1;
- }
- if (*str == ' ')
- {
- flag = 1;
- }
- }
- return(flag);
- }
- int main(void)
- {
- char string[10] = { 0 };
- int i;
- printf("enter string \n");
- for (i = 0; i<10; i++)
- {
- *string = getchar();
- }
- checkstring_f(string);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement