how to find string length wihtout using c function?
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
int str_len(char *)
void main()
{
char s[30];
int count;
printf("enter the string :");
gets(s);
count=str_len(s);
printf("the length is :%d",count);
getch();
}
int str_len(char *a)
{
int i=0;
while(*a!='\0')
a++;
i++;
}
return i;
}
thank u
Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
Write the test cases for checking a variable having value in range -10.0 to +10.0?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Is it possible to execute code even after the program exits the main() function?
about c language
What does it mean when the linker says that _end is undefined?
how many key words availabel in c a) 28 b) 31 c) 32
Explain what are the __date__ and __time__ preprocessor commands?
What are global variables?
What is a node in c?
What is declaration and definition in c?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
Can a local variable be volatile in c?
What is the function of this pointer?