C Program to Find String Length
/*
Write a program to Find String Length without using inbuilt function.
*/
#include <stdio.h>
int main(void) {
// your code goes here
char str[100];
int len;
printf("Enter the String :");
scanf("%s",str);
for(len=0;str[len]!='\0';len++)
{
}
printf("Length = %d",len);
return 0;
}
Write a program to Find String Length without using inbuilt function.
*/
#include <stdio.h>
int main(void) {
// your code goes here
char str[100];
int len;
printf("Enter the String :");
scanf("%s",str);
for(len=0;str[len]!='\0';len++)
{
}
printf("Length = %d",len);
return 0;
}
Comments
Post a Comment