what is the difference between NULL('\0') and 0?
Answer Posted / salim
I am going to speak in cotext to c language.
NULL is a macro defined in header files such as
stdio.h,stdlib.h,alloc.h,stddef.h,mem.h.The c pre processor
substitutes NULL by the value 0.Its declaration appears to
be like #define NULL 0 in the standard libraries.It is
used to initialise pointers to 0 and helps in portability.
It is a null pointer constant a convention for programmers
to initialise pointers.It is used mainly with pointer.
0 is simply an integer constant.
/0 is a backslash character contant used to indicate end of
string or a string terminator.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is a stream?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
Is stack a keyword in c?
Explain 'far' and 'near' pointers in c.
Is javascript based on c?
Why is c known as a mother language?
What does sizeof int return?
Write a program to check armstrong number in c?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
why wipro wase
hi any body pls give me company name interview conduct "c" language only
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
Explain how can you check to see whether a symbol is defined?
What is the scope of static variable in c?
Is a house a shell structure?