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 is logical error?
What is assert and when would I use it?
What is a structural principle?
Write a program to print "hello world" without using a semicolon?
What do you mean by command line argument?
What is meant by int main ()?
What are 3 types of structures?
What is putchar() function?
What are pointers? Why are they used?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
How to define structures? ·
Which is better between malloc and calloc?
What is a pointer on a pointer in c programming language?
What does c mean?