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
πŸ’¬ Discuss
βœ… Correct Answer: (C) Segmentation fault
Explanation: Dereferencing a NULL pointer leads to runtime error: segmentation fault.
Explanation by: Mr. Dubey
Dereferencing a NULL pointer leads to runtime error: segmentation fault.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
82
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
89%
Success Rate