how to find string length wihtout using c function?
Answer Posted / ruchi
#include<conio.h>
#include<stdio.h>
int main()
{
char a[10];
int i=0,c,length=0;
printf("\nEnter the string ");
while((a[i++]=getchar())!='\n');
printf("\nThe lengh of the string is ");
i=i-1;
printf("%d",i);
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is the function of pragma directive in c?
regarding pointers concept
Explain continue keyword in c
What is the difference between c &c++?
How can I open files mentioned on the command line, and parse option flags?
What is masking?
Describe wild pointers in c?
What are the different types of control structures?
Why use int main instead of void main?
What does a pointer variable always consist of?
What are the main characteristics of c language describe the structure of ac program?
What are the different types of objects used in c?
In c language can we compile a program without main() function?
What is the use of structure padding in c?
What are the storage classes in C?