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 use of putchar function?
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
How many types of arrays are there in c?
What is extern variable in c with example?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
What is gets() function?
Describe dynamic data structure in c programming language?
When should you not use a type cast?
What is wrong with this program statement?
Define and explain about ! Operator?
Stimulate calculator using Switch-case-default statement for two numbers
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
Explain what is the benefit of using #define to declare a constant?
What is c programming structure?