+ 1

Is ZERO an integer?

21st Dec 2021, 10:24 AM
Pavithra Ilankoon
Pavithra Ilankoon - avatar
2 Respostas
+ 3
Sure! There is no problem to initialize a variable like this: int variable = 0; Don't make confusions between 0 (zero) and NULL, or '\0' (these are in C) or nil (Swift) and many more. But the conclusion is that zero is an integer. In programming there are some discussions on -0 and +0. Just read about the one's and two's complement in programming.
21st Dec 2021, 10:27 AM
Romeo Cojocaru
Romeo Cojocaru - avatar