I have a char pointer initialized to NULL at the beginning of the program, further in the program the char* is used in a function call where it might get pointed to a string of char s and it might point to null char, and it might remain untouched. So is the following statement correct, it should be if the expressions are evaluated from left to right. If not then strlen ( charpointer ) is undefined behavior, if charpointer == NULL
if ( charpointer == NULL || strlen ( charpointer ) == 0 )
So, do they get evaluated from left to right ? Is this the correct way to go about checking like this ?