First of all - don't use char-string in c++! Use std::string.
Your while loop continues until it reach zero which is the string termination, so %s is just an empty string. The '<' and '>' is still printed even if the string is empty.
Your text pointer start as the following chars:
'h','e','l','l','o',' ','w','o','r','l','d','\0'
After the first loop, text points to:
'e','l','l','o',' ','w','o','r','l','d','\0'
After second loop, text points to:
'l','l','o',' ','w','o','r','l','d','\0'
And so on.
The while-loop continues until text points to '\0' which is just an empty string, i.e. "".
Consequently %s doesn't print anything.
In c++ do:
int main() {
std::string text = "hello world";
cout << "Char num of <" << text << "> = " << text.size() << std::endl;
}