PUBLIC SERVICE COMMISSIONS

Global Search Engine

Your Favorite Questions

The ______ pointer arises when you use the address of an object after its lifetime is over.

0
A) Smart
B) Null
C) Dangling
D) Both a and c

Correct Answer: C) Dangling

• In advanced programming languages like C and C++, a Dangling pointer points to memory that has already been freed. • This dangerous memory bug occurs when an object's lifetime ends, but the pointer still references that memory location. • Accessing a dangling pointer frequently leads to unpredictable software crashes or critical security vulnerabilities. • Null pointers, by contrast, explicitly point to nothing and are intentionally initialized for safety.

Advertisement

[ Ad Banner Space ]

Discussion (0)

Discussion mein hissa lene ke liye login karna zaroori hai.

Login / Register

Koi comment nahi. Sab se pehle aap apna comment karein!

Related Questions

Sub Categories

Leave a Reply / Ask a Question