Welcome..!!

Please visit http://csprograms.in/ for more Computer Science programs.

Wednesday 14 March 2012

19. C++ program to find the length of a string.


# include <iostream>
# include <string>

int main()

{
char s1[25];
cout << “Enter the string:”;

cin > > str1;
cout < < “Strlen(str1): “< < strlen(str1) < < end1;
return 0;
}

2 comments:

  1. C++ program to Find Length of String

    Length of String is the number of character in the given String. For Example: String="Language" this string have 8 characters also this string is the size of string.

    ReplyDelete