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 doesnt long int work?

1048


Why do we use main function?

1186


Write a program which returns the first non repetitive character in the string?

1127


Explain what are the different data types in c?

1225


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

1304


Why is c so popular?

1165


What are different types of operators?

1046


Why is c still so popular?

1050


What is the heap in c?

1085


What is the meaning of typedef struct in c?

1072


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2477


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

1506


write a c program to calculate sum of digits till it reduces to a single digit using recursion

3315


What are structures and unions? State differencves between them.

1181


Implement bit Array in C.

1153