Doubt in CanYouReadThis problem

I tried a lot creating my own string tokenizer function which divides the string when it encounters a upper case letter but it is giving wrong output.
I am not getting any other approach to solve the problem.
Sir please tell me what approach i should follow?

@rishu7865 hey rishabh apply a loop
for(int i=0;s[i]!=’\0’;i++)
if(i==0&&s[i]>=ā€˜A’&&s[i]<=ā€˜Z’)
cout<<s[i];
else if(s[i]>=ā€˜a’&&s[i]<=ā€˜z’)
cout<<s[i];
else if(s[i]>=ā€˜A’&&s[i]<=ā€˜Z’)
cout<<endl;
cout<<s[i];
close the loop