+1 vote
110 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 10 views
0 votes
1 answer 11 views
0 votes
1 answer 10 views
+1 vote
1 answer 25 views
+1 vote
1 answer 22 views
asked Jan 17 in Compilers & Operating Systems by (user.guest)
+1 vote
1 answer 23 views
+1 vote
1 answer 44 views
+1 vote
1 answer 48 views
+1 vote
1 answer 46 views
+1 vote
1 answer 35 views
+1 vote
1 answer 45 views
asked Jan 9 in Compilers & Operating Systems by (user.guest)
+1 vote
1 answer 68 views
asked Jan 8 in Compilers & Operating Systems by (user.guest)
+1 vote
1 answer 66 views
0 votes
1 answer 236 views
+1 vote
1 answer 47 views
+1 vote
1 answer 81 views
asked Sep 15, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 75 views
asked Sep 15, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 508 views
+1 vote
1 answer 83 views
asked Sep 14, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 85 views
+1 vote
1 answer 44 views
+1 vote
1 answer 279 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.6k views
+1 vote
1 answer 265 views
asked Oct 10, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 168 views
asked Oct 10, 2019 in Compilers & Operating Systems by anonymous
+2 votes
1 answer 145 views
asked Oct 10, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 210 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+2 votes
1 answer 107 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 112 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 622 views
+1 vote
1 answer 154 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 320 views
+1 vote
1 answer 163 views
+2 votes
2 answers 323 views
asked Sep 29, 2019 in Compilers & Operating Systems by (user.guest)
+2 votes
1 answer 211 views
+1 vote
1 answer 966 views
+2 votes
1 answer 866 views
+1 vote
1 answer 120 views
+1 vote
1 answer 18 views
Welcome to CPENTalk.com
Solution-oriented students of computer engineering on one platform to get you that

ONE SOLUTION

...