Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between NULL('\0') and 0?

Answer Posted / salim

I am going to speak in cotext to c language.
NULL is a macro defined in header files such as
stdio.h,stdlib.h,alloc.h,stddef.h,mem.h.The c pre processor
substitutes NULL by the value 0.Its declaration appears to
be like #define NULL 0 in the standard libraries.It is
used to initialise pointers to 0 and helps in portability.
It is a null pointer constant a convention for programmers
to initialise pointers.It is used mainly with pointer.

0 is simply an integer constant.

/0 is a backslash character contant used to indicate end of
string or a string terminator.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

1070


What is difference between Structure and Unions?

1207


Can we replace the struct function in tree syntax with a union?

1257


List some of the static data structures in C?

1171


Is main is a keyword in c?

1084


What is methods in c?

1039


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

2354


What do you mean by dynamic memory allocation in c? What functions are used?

1128


Is c easy to learn?

952


Is fortran faster than c?

1011


What is hash table in c?

996


What are the different types of pointers used in c language?

1012


You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

2297


Difference between MAC vs. IP Addressing

1111


What is null pointer in c?

960