how to generate the length of a string without using len
funtion?
Answer Posted / shruti
** same as above.. only u should initialise the valued of
varibale len to 0..
otherwise it will pick up some garbage value.. **
int strlength(char s[])
{
int i , len;
len = 0;
for(i = 0 ; s[i] != '/0' ; i++)
{
len++;
}
return len;
}
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Explain the binary height balanced tree?
What is calloc()?
What are the standard predefined macros?
What oops means?
What is function and its example?
What is the purpose of ftell?
Explain how do you generate random numbers in c?
Why we not create function inside function.
What is pointer to pointer in c?
How can I make it pause before closing the program output window?
What is extern storage class in c?
What are qualifiers?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
What is the purpose of 'register' keyword?
What are enumerated types?