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
Explain how do you determine whether to use a stream function or a low-level function?
What are pointers? What are stacks and queues?
Explain what are run-time errors?
what is the difference between class and unio?
Explain a file operation in C with an example.
What are the 5 types of organizational structures?
What are qualifiers?
please give me some tips for the placement in the TCS.
What is the use of #define preprocessor in c?
Why isn't any of this standardized in c? Any real program has to do some of these things.
When should you not use a type cast?
What are volatile variables in c?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
How would you obtain the current time and difference between two times?