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
Why we not create function inside function.
Is anything faster than c?
Is c procedural or functional?
write a program to find out prime number using sieve case?
What does the format %10.2 mean when included in a printf statement?
What is echo in c programming?
What is structure in c definition?
What is a shell structure examples?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
How can you determine the size of an allocated portion of memory?
Describe the modifier in c?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
Why is struct padding needed?
What does p mean in physics?
What are lookup tables in c?