Write a program to find length of a string using library function.

#include<stdio.h>
#include<string.h>
main()
{
    char str[100];
    printf("\nEnter a string=");
    scanf("%s",str);
    printf("\nLength of the string=%d",strlen(str));
}

No comments:

Post a Comment