Boxed(True/False)

header ads

Write a c program to find out the length of the string

Find out the length of the string

#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
char str[100],i=0,length;
printf("please enter the string\n");
gets(str);
while(str[i]!='\0')
{
i++;
length=i;
}
printf("\n the length of string is %d",length);
getch();
}

Post a Comment

0 Comments