C program to accept a string and find out total numbers of characters






#include<stdio.h>
#include<string.h>

int main(){
    char str[20];

    printf("Enter any string: ");
    scanf("%s",&str);
    printf("Length of string: %d",strlen(str));

    return 0;
}




No comments: