Last active
August 29, 2015 14:01
-
-
Save Manume/ad200b7497a2ba66c4df to your computer and use it in GitHub Desktop.
program to find the length of string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream.h> | |
#include <conio.h> | |
#include <string.h> | |
void main() | |
{ | |
clrscr(); | |
int slength; | |
char x[81]; //Allowing the user to input a maximum of 80 characters. | |
cout << "Enter the string : " << endl; | |
cin>>x; | |
slength=strlen(x); | |
cout << "The length of the string " << x << " is " << slength << "." << endl; | |
getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment