#include <iostream>
int main()
{
const char* strings[] = { "", "", "non-empty string" };
{
int i = 0 ;
for ( ;*strings[i]; ++i )
;
std::cout << "After for i = " << i << '\n' ;
}
{
int i=0;
do
{
++i ;
} while ( *strings[i] ) ;
std::cout << "After do-while i = " << i << '\n' ;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oKQp7Cgljb25zdCBjaGFyKiBzdHJpbmdzW10gPSB7ICIiLCAiIiwgIm5vbi1lbXB0eSBzdHJpbmciIH07CgoJewoJCWludCBpID0gMCA7CgkJZm9yICggOypzdHJpbmdzW2ldOyArK2kgKQoJCQk7CgkJCQoJCXN0ZDo6Y291dCA8PCAiQWZ0ZXIgZm9yIGkgPSAiIDw8IGkgPDwgJ1xuJyA7Cgl9CgkKCXsKCQlpbnQgaT0wOwoJCWRvCgkJewoJCQkrK2kgOwoJCX0gd2hpbGUgKCAqc3RyaW5nc1tpXSApIDsKCQkKCQlzdGQ6OmNvdXQgPDwgIkFmdGVyIGRvLXdoaWxlIGkgPSAiIDw8IGkgPDwgJ1xuJyA7Cgl9Cn0=