Answer to Question #260591 in C++ for mannya

Question #260591

Write a function that finds out length of a string? (Don’t use predefined functions)

Int str_len(char*);


1
Expert's answer
2021-11-04T03:51:04-0400
int str_len(char* foo) {
    int l = sizeof(foo)/sizeof(*foo);
    return l-1;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS