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
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
What is dynamic dispatch in c++?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
Who developed c language?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
What does sizeof return c?
Why do we use & in c?
What is scope rule of function in c?
Mention four important string handling functions in c languages .
Why do we use namespace feature?
What are the two forms of #include directive?
What is a null pointer in c?
What is uint8 in c?
What is the use of define in c?