how to find the length of a string in c without using function
Answers
Answered by
1
# include <stdio.h>
void main ()
{
int Count = 0;
char Str [100];
Printf ("\n Please enter any string \n");
gets (Str);
while(Str [Count] != '\0')
{
Count++ ;
}
Printf ("\nLength of the string = %d",Count);
}
OUTPUT
Please enter any string.
Please mark brainliest
Length of the string = 22
Thanks
void main ()
{
int Count = 0;
char Str [100];
Printf ("\n Please enter any string \n");
gets (Str);
while(Str [Count] != '\0')
{
Count++ ;
}
Printf ("\nLength of the string = %d",Count);
}
OUTPUT
Please enter any string.
Please mark brainliest
Length of the string = 22
Thanks
Similar questions