Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
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
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Preincrement/Decrement Operator in C++
WhatsApp
Krishna Rajput Singh
Aug 07
2015
1.1
k
0
1
#include<stdio.h>
#include<conio.h>
main()
{
int
x=11,y=12,z=13,w;
//initialize variables and values
w=++x-y++;
printf("w=%d,x=%d,y=%d\n,w,x,y);
w=++%---y;
printf(
"w=%d,z=%d,y=%d\n"
,w,z,y);
w=++y+x++*z--;
printf(
"w=%d,y=%d,x=%d,=%d\n"
,w,y,x,z);
w=++x%++y%++%w--;
printf(
"w=%d,x=%d,y=%d,z=%d\n"
,w,x,y,z);
w=++w/++x/y--;
printf(
"w=%d,x=%d,y=%d\n"
,w,x,y);
getch();
return
0;
}
operator increment and decrement
C++
Up Next
Preincrement/Decrement Operator in C++