#include <iostream>
using namespace std;
int main(){
char word[100];
char count;
int j=0;
cout<<"Enter a word or a phrase"<<endl;
cin>>word;
cout<<endl<<word<<endl;
j=sizeof(word);
cout<<j;
}
What I want to do in the above program is to find out the length of the string(word) that was inputted by the user, but the above program just gives the size of the whole array which is 100.