how to generate the length of a string without using len
funtion?

Answer Posted / shreesha vailaya


int strlength(char s[])
{
int i,len;
for(i=0;s[i];i++)
len++;
return len;
}

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

1806


What is the difference between c &c++?

649


What is getch () for?

681


What is c token?

615


hi, which software companys will take,if d candidate's % is jst 55%?

1669






Write a program to check prime number in c programming?

604


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

2941


How can you increase the allowable number of simultaneously open files?

599


What happens if a header file is included twice?

602


Describe wild pointers in c?

644


Can you write the function prototype, definition and mention the other requirements.

664


Explain how do you sort filenames in a directory?

613


Can an array be an Ivalue?

668


Explain the use of #pragma exit?

701


#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }

722