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
Is multithreading possible in c?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
Can we use visual studio for c?
Is c weakly typed?
How to get string length of given string in c?
Explain the difference between malloc() and calloc() function?
What are the advantages and disadvantages of a heap?
What is the meaning of c in c language?
What are the complete rules for header file searching?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
Explain what is the concatenation operator?
Explain the difference between the local variable and global variable in c?
How can I open a file so that other programs can update it at the same time?
What is the basic structure of c?
What is sizeof array in c?