Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int slengthptr(char s[]) {
- int count = 0;
- char *sptr = s; // puntatore char perchè s è un char
- if (sptr == NULL) {
- return -1;
- }
- while (*sptr!='\0') {
- count++;
- sptr++;
- }
- return count;
- }
Advertisement
Add Comment
Please, Sign In to add comment