Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define LIMIT 50
- int stringLen(char str[])
- {
- int i = 0 ;
- while (str[i] != '\0') i++ ;
- return (i) ;
- }
- void main ()
- {
- char str[LIMIT] ;
- printf ("Palavra? ") ;
- scanf ("%s" , str) ;
- printf ("Comprimento : %d\n" , stringLen(str)) ;
- }
Advertisement
Add Comment
Please, Sign In to add comment