+ 2

Are null and zaro are the same in C++

is not the same, Null is termination in strings array

1st May 2017, 10:58 PM
Farina Zzz
Farina Zzz - avatar
5 odpowiedzi
+ 11
Null basically have NO VALUE. & 0 is a numeric value itself. Null value is empty, undefined or not even initialized. When a variable is null then variable assign no any value, but if variable is 0 then it hold a integer in memory.
2nd May 2017, 1:43 AM
Vidya
Vidya - avatar
+ 10
NULL is defined as 0, so they are the same thing. NULL is a concept used for pointers because it makes more sense to define it that way since pointing to NULL is like pointing to nothing (kind of like an empty set in math) instead of 0.
1st May 2017, 11:12 PM
Karl T.
Karl T. - avatar
+ 4
null is a absence of a value. but 0 is a value. its like "null" if you didn't appear in a exam and 0 if you can't answer anything
1st May 2017, 11:07 PM
xCalifier
xCalifier - avatar
+ 4
I have answered this exact question before https://www.sololearn.com/Discuss/345807/are-null-and-zero-that-same-thing-in-c anything equal to 0 maybe initialised as 0. meaning, its only applicable to datatypes supporting numerics. NULL on the other hand may mean its empty. like a string, char or any other relative data types
2nd May 2017, 12:43 AM
Krishneel Nair
Krishneel Nair - avatar
0
Vidya,1xp away from reaching level 13 great,
13th Sep 2017, 10:17 AM
Samayamantula Sai Datta
Samayamantula Sai Datta - avatar