Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
1
Reply
Wy output of cout<<++c<
rajeev kumar
17y
6.9k
0
Reply
Submit
If you question is What will be the output then the answer is:
This is the case of pre-increment and post-increment.
Pre-Increment: In this first the value of attribute is incremented by 1 and then further operation will carried out.
Post-Increment: In this first operation is carried out and then value is incremented by 1.
Your Example is the case of Pre-incrementation. So first the value of "c" will increment by 1 and then will perform cout operation i.e. if the value of "c" is 25 then in output we will see the value of c is 26 if you write something after second << otherwise the program will not get compiled because of the syntax problem or "; (Semicolon) " missing at the end of line.
Ramchandra Desai
14y
0
Message