45-Write a program to calculate the length of string.

Program: 45

Write a program to calculate the length of string.

#include
#include
void main()
{
    char str[20]="EASTER SCIENCE";
    printf("Length of %s is: %d",str, strlen(str));
    getch();
}
Output
Length of EASTER SCIENCE is: 14

 

Lokesh Kumar: Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.
Related Post
Leave a Comment

This website uses cookies.