Is a global pointer initialized to zero?

Viewed 3127

I was wondering what the cpp standard says about global initialization. I have found this answer helpful, but there was no mention of a pointer type.

Is there a guarantee that this will work?

char* myptr
int main()
{
    if (myptr == NULL)
    {
        std::cout << "All good!" << std::endl;
    }
}
2 Answers
Related