about pointers in c++ -



about pointers in c++ -

in next questions, p1,p2, abd p3 pointers intergers. in origin of each question *p1 , *p2 both have value 10.

after executing next statements, value of *p1 , *p2

p3 = null p3 = p1 p1 = p2 p2 = p1

the way did ended getting 10 both same way started.

p3 = null p3 = p1 ;now p3 set 10 p1 = p2 ;now p1 set 10 p2 = p1 ;now p2 set 10

but don't think i'm understanding correctly.

the lastly line sets p2 p1, set p2; both p1 , p2 point original target of p2, contains value 10.

c++ pointers

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -