Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
1
Reply
Wy output of cout<<++c<
rajeev kumar
17y
6.5k
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