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 does emoji p mean?
In a switch statement, what will happen if a break statement is omitted?
What is the importance of c in your views?
Implement bit Array in C.
Which header file is essential for using strcmp function?
How can a number be converted to a string?
How can I manipulate individual bits?
What is advantage of pointer in c?
What is difference between static and global variable in c?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
Is c easy to learn?
Why do we need a structure?
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 are volatile variables in c?
What are 3 types of structures?