0

can someone tell me what the hell is NULL

10th Oct 2016, 6:33 AM
Seinsora x
Seinsora x - avatar
5 Answers
+ 2
'null' is a reference parameter which represents value 'zero' and which doesn't refer to any object. There is no representation for 'null' in memory. In simple word's, 'null is empty'.
10th Oct 2016, 6:53 AM
Swagat
Swagat - avatar
+ 2
what swagat wrote. Consider NULL to be absolutely nothing you can work with
10th Oct 2016, 7:48 AM
Grennith
+ 1
Null is basically a constant with zero value
10th Oct 2016, 5:53 PM
Mayank
+ 1
suppose u have something like... int *p; // not initialized ie wild pointer as by default it will be auto storage class the did fault value will be some garbage value. The garbage here refers to some value which can be pointing to some thing. Dereferencing the value without initialization may throw some exception or can cause some serious issues if it finds the garbage value to be valid address in user space while editing the value. in system space it will violate the permission and get exception. so to avoid such we use the special pointer as NULL pointer which points to nothing and is considered to be void *0
21st Oct 2016, 8:57 PM
PANKAJ KUMAR
PANKAJ KUMAR - avatar
0
Thank you ..
11th Oct 2016, 12:11 AM
Seinsora x
Seinsora x - avatar