Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- int main()
- {
- int i = 0;
- char arr[101];
- scanf("%s", arr);
- if (arr==NULL){
- printf("0"); return(0);}
- else
- {
- while (arr[i]!='\0')
- {
- i++;
- }
- }
- if (i>100) return 0; //Если символов больше ста, то программа просто завершается.
- if (i<0) printf("0");
- else printf ("Length: %d", i);
- return(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement