//C++ program to calculate the length of the string #include<iostream.h> #include<conio.h> #include<stdio.h> void main() { clrscr(); int i; char string[20]; cout<<"Enter A String\n"; gets(string); for(i=0;string[i]!='\0';i++); cout<<"The length of the string is"<<i; getch(); }
Comments
Post a Comment