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
Explain what are run-time errors?
Was 2000 a leap year?
Can we assign integer value to char in c?
What does c value mean?
What does nil mean in c?
What is a dynamic array in c?
What is the difference between array and linked list in c?
Can an array be an Ivalue?
How can you determine the size of an allocated portion of memory?
Can you define which header file to include at compile time?
How do we declare variables in c?
What is data structure in c programming?
In C, What is the #line used for?
What is floating point constants?
Explain modulus operator.