how to generate the length of a string without using len
funtion?
Answer Posted / dattathreya
The below function should do it:
int strLength(char *s)
{
int i;
for(i = 0; s[i]; i++);
return i;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is it fine to write void main () or main () in c?
What does %p mean?
What is a program flowchart?
What is %s and %d in c?
What is the use of sizeof () in c?
write a program to copy the string using switch case?
Can stdout be forced to print somewhere other than the screen?
Is null a keyword in c?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
Why we use conio h in c?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What is void main () in c?
What are pragmas and what are they good for?
All technical questions