Search Your Question

Difference between nil, NIL and null

Ans : 

The difference is that while
NULL represents zero for any pointer,
nil is specific to objects (e.g., id) and
Nil is specific to class pointers.


Nil,Null and nil are used with below
1> Nil for Objective c Class
2> nil for Objective c object
3> Null for C pointer
Example:
1>Class A=Nil;
2>NSString strName=nil;
3>char *pointerChar = NULL;




No comments:

Post a Comment