how to find string length wihtout using c function?
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
int str_len(char *)
void main()
{
char s[30];
int count;
printf("enter the string :");
gets(s);
count=str_len(s);
printf("the length is :%d",count);
getch();
}
int str_len(char *a)
{
int i=0;
while(*a!='\0')
a++;
i++;
}
return i;
}
thank u
| Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
What are the loops in c?
What are nested functions in c?
How can I ensure that integer arithmetic doesnt overflow?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
What tq means in chat?
What is the purpose of 'register' keyword in c language?
Multiply an Integer Number by 2 Without Using Multiplication Operator
What is sorting in c plus plus?
Explain what will the preprocessor do for a program?
Write a program of advanced Fibonacci series.
How the c program is executed?
When should I declare a function?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
What are the types of operators in c?
What are the types of functions in c?