Monday, January 25, 2021

find lenght of string in cpp c++ with eaglesoft programmers

 


#include<iostream>
#include<string.h>
using namespace std;
int main()
{
    char name[50];
    cout<<"enter your name"<<endl;
    gets(name);
    int n=strlen(name);
    cout<<"Lenght of this string is :"<<n<<endl;
    return 0;
}

No comments:

Post a Comment