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

Explain what is a stream?

1145


Why is it important to memset a variable, immediately after allocating memory to it ?

2133


What are linker error?

1150


regarding pointers concept

2097


What is the difference between memcpy and memmove?

1086


What is an auto keyword in c?

1146


Explain how do you sort filenames in a directory?

1077


Write a program to check palindrome number in c programming?

1066


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

1173


What is indirection?

1150


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

6024


What is void c?

1163


How do I swap bytes?

1121


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

1168


What is the difference between null pointer and wild pointer?

1250