+ 1
Is zero the same as null?
2 ответов
0
Well, because you put the tag if-statement, yes, there are equal in that sense. In a way, they behave equally when treated them as a bool.
Let me explain.
If you have an if statement with NULL, nullptr or 0 as the statement, they will always be implicitly casted to bool as false.
So,
if(!0 && !NULL && !nullptr) {
// This will always be executed.
}
- 2
zero = number.. can be as index number, etc... null ?? I'm not friends with that😁