A

Admin • 833K Points
Coach

Q. What will happen if you dereference a NULL pointer?

  • (A) It prints 0
  • (B) It accesses garbage
  • (C) Segmentation fault
  • (D) It compiles fine and runs
  • Correct Answer - Option(C)
  • Views: 21
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

Dereferencing a NULL pointer leads to runtime error: segmentation fault.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.