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
Why do we need a structure?
What does c in a circle mean?
What is the purpose of void pointer?
What is the advantage of c?
How do you declare a variable that will hold string values?
Why is python slower than c?
When should structures be passed by values or by references?
What is the use of putchar function?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
What does s c mean in text?
Can you pass an entire structure to functions?
What is include directive in c?
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
List out few of the applications that make use of Multilinked Structures?