C programming made easy.
#include<stdio.h> int main() { char str[20]; int length; printf("\nEnter the string : "); gets(str); length = 0; while (str[length] != '\0') length++; printf("\nLength of the string = %d", length); return(0); }
No comments:
Post a Comment