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
What is an auto keyword in c?
What is header file definition?
What is meant by gets in c?
What is advantage of pointer in c?
Why dont c comments nest?
When should structures be passed by values or by references?
how to write optimum code to divide a 50 digit number with a 25 digit number??
write a program to rearrange the array such way that all even elements should come first and next come odd
Wt are the Buses in C Language
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
What is a structure member in c?
Is c call by value?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
Explain the difference between the local variable and global variable in c?
c program for searching a student details among 10 student details