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 / shashwat

Actually binary code of both are same.
0 -> 00000000 NULL
But when this 0 is included in a string or char as

char x = '0';
or char x[20] = "1230";

It is the character zero (not NULL). It has an ASCII of 48
and will be stored as
00110000.

That is why, they have created different zeroes to
represent either the character zero or ASCII value zero.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are loops c?

996


Define Spanning-Tree Protocol (STP)

1071


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

1197


What is nested structure with example?

1012


What are the basic data types associated with c?

1220


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1033


What is string in c language?

1075


Define macros.

1223


Array is an lvalue or not?

1066


What is null pointer in c?

947


What are the 4 data types?

963


What is header file definition?

1024


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

1190


What is string constants?

1097


Write a program to swap two numbers without using a temporary variable?

1070