I am trying this following code in cpp
#include <iostream>
#include <string>
void Strlength(const string& s) {
    cout << s.length() << endl;
}
int main() {
    string s;
    cin >> s;
    cout << s.length() << endl;
    Strlength(s);
    return 0;
}
The string which I am giving as input is 100,000 characters long and is like "xxxxxxx...xxxxabcde"(fill the ... with remaining x) 
This gives me the output as
4095
4095
I am expecting the output to be 100000. what am I doing wrong?
This relates to one of the hackerrank problem (Test case 10): String Similarity
 
    