file.cpp
#include<iostream>
using namespace std;
int main()
{
char str[20];
cout<<"Enter String :";
cin>>str;
int count=0;
for(int i=0;str[i]!='';i++)
{
count++;
}
cout<<count;
}
#include<iostream>
using namespace std;
int main()
{
char str[20];
cout<<"Enter String :";
cin>>str;
int count=0;
for(int i=0;str[i]!='';i++)
{
count++;
}
cout<<count;
}