#include<stdio.h>
#include<string.h>intmain(){chars[50];printf("———————————————————————————————————————————");printf("\nProgram to print length of a given string");printf("\n———————————————————————————————————————————");printf("\nEnter the string ");scanf("%s",s);intl=strlen(s);printf("\nLength of string is %d",l);printf("\n———————————————————————————————————————————\n");return0;}
Output
kodingwindow@kw:~$ gcc kw.c kodingwindow@kw:~$ ./a.out
———————————————————————————————————————————
Program to print length of a given string
———————————————————————————————————————————
Enter the string KODINGWINDOW
Length of string is 12
———————————————————————————————————————————
kodingwindow@kw:~$
Dear User, Thank you for visitng Kodingwindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the Kodingwindow Android app. We intend to soon make it available on the Google Play Store. Currently, Android versions 10 and up require manual apk installations. Would you like to get the app?