Calculating string length

Calculating string length in C

#include
#include
int main()
{
char str[30]=”C PROGRAMMING”;
clrscr();
printf(“\n\nstr : %s\n\n”,str);
printf(“\nLength of the string, strlen(str) is %d\n”,strlen(str));
getch();
return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *