+1 vote
93 views
in Compilers & Operating Systems by

1 Answer

+1 vote
by
selected by (user.guest)
 
Best answer

Dangling References: Referring to locations which have been de-allocated.

void main()

{

int *p;

p = dangle(); /* dangling reference */

}

int *dangle();

{

int i=23;

return &i;

}

The problem of dangling references arises, whenever storage is de-allocated. A dangling reference occurs when there is a reference to storage that has been de-allocated. It is a logical error to use dangling references, since the value of de-allocated storage is undefined according to the semantics of most languages. Since that storage may later be allocated to another datum,  mysterious bugs can appear in the programs with dangling references.


Related questions

0 votes
1 answer 7 views
+1 vote
1 answer 21 views
+1 vote
1 answer 23 views
+1 vote
1 answer 21 views
asked Jan 9 in Compilers & Operating Systems by (user.guest)
+1 vote
1 answer 51 views
asked Jan 8 in Compilers & Operating Systems by (user.guest)
+1 vote
1 answer 52 views
0 votes
1 answer 223 views
+1 vote
1 answer 43 views
+1 vote
1 answer 78 views
asked Sep 15, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 65 views
asked Sep 15, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 478 views
+1 vote
1 answer 76 views
asked Sep 14, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 80 views
+1 vote
1 answer 41 views
+1 vote
1 answer 273 views
asked May 24, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 1.5k views
+3 votes
1 answer 5.3k views
+3 votes
1 answer 9.4k views
+1 vote
1 answer 261 views
asked Oct 10, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 160 views
asked Oct 10, 2019 in Compilers & Operating Systems by anonymous
+2 votes
1 answer 142 views
asked Oct 10, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 207 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+2 votes
1 answer 104 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 111 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 602 views
+1 vote
1 answer 151 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 315 views
+1 vote
1 answer 155 views
+2 votes
2 answers 316 views
asked Sep 29, 2019 in Compilers & Operating Systems by (user.guest)
+2 votes
1 answer 207 views
+1 vote
1 answer 936 views
+2 votes
1 answer 852 views
+1 vote
1 answer 117 views
+1 vote
1 answer 43 views
+1 vote
1 answer 98 views
+1 vote
1 answer 182 views
+1 vote
1 answer 152 views
Welcome to CPENTalk.com
Solution-oriented students of computer engineering on one platform to get you that

ONE SOLUTION

...