sign up I login
 advanced
refer a friend - earn nickels!!

Ask & Discuss Questions with Community & Experts

Moderation Team
Ask iit jee aieee pet cbse icse state board community Discussion Response Post to: wat's d output
Forum Index -> Computer Science -> View Full Question like the article? email it to a friend.  
Author Message
sugargal_anu (169)

Hot goIITian

Olaaa!! Perrrfect answer. 31  [38 rates]

sugargal_anu's Avatar

total posts: 135    
offline Offline
The output is-
E

Its because cout<<*p; represents the first character of the array, which is D.

now, if it was cout<<*p++; it is post-incrementation, which means, D will be print & then the first element will be incremented to E.

had it been cout<<++*p; it is pre-incrementation, which means, it will increment the first value to E and then print it.

since v hav cout<<++*p++;
it is both pre-incremented & post-incremented. so the output will be E. but if u happen 2 use p afterwards, the first element  will be F.

Orkut Graphics - Angels
 this reply: 5 points  (with Olaaa!! Perrrfect answer.   in 1 votes )   [?]
 
You have to be logged on to rate
  
 

Top Offers for goIITians
Correspondence Courses
Brilliant Tutorials
Narayana Institute
Aakash Institute
Classroom/Crash Courses
Narayana - Kota , Delhi , Others
Brilliant Tutorials - Class , Crash
Aakash Institute - Medical , Engg
Online Test Series
Brilliant Tutorials
Narayana Institute
Aakash Institute
Mahesh Tutorials
AMITY      Sri Chaitanya