top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Where NULL is defined and how it is defined?

+3 votes
188 views

Everyone says NULL is defined in either stdio.h or stddef.h,
I have searched in this file i dint get defined NULL inside?

Can anyone tell where NULL is defined? And How it is defined?

posted Apr 22, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Exactly I don't know where it is defined but the definition is as following:

#define NULL (void*)0
answer Apr 22, 2016 by Harshita
Similar Questions
+2 votes

The following two code sequences produce the same result:

uint mod = val % 4;   
uint mod1 = val & 0x3;

I can use both to calculate the same result. I know that in hardware the & operator is much more simpler realised than the % operator. Therefore I expect it to have a better performance than the % operator.

0 votes

What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?

...