English, asked by anjaliawad0, 10 months ago

4 Which one of the following represents a correct and safe declaration of NULL ?
a) typedef((void *)0) NULL;
b) typedef NULL(char *)0;
c) #define NULL((void *)0)
d) #define NULL((char*)0)

Answers

Answered by Angelshira22518
0

Answer:

c) #defineNULL(Char*)0)

, Hope it helps

Answered by amikkr
0

From the given options the one which represents a correct and safe declaration of NULL is t#define NULL((char*)0) (Option d)

  • The C library Macro NULL is actually the value of any null pointer constant, which can be defined as ((void*)0), 0, or 0L. That completely depends upon the compiler itself. Like - #define NULL ((char *)0) or, #define NULL 0L, or #define NULL 0.
  • NULL should be used as a pointer.
  • To avoid errors the NULL won't be used as constant 0, we define #define NULL((char *)0).

  • #SPJ3
Similar questions