Incremaent/decrement Operator
Abror_7
Posted on January 10, 2023
Increment/Decrement operatorlari o'zgaruvchini bitta oshirib berish yoki kamaytirib berish . a++
,++a
,b++
,++b
,a--
,--a
,b--
,--b
.
- Agar ++,-- a yoki boshqa o'zgaruvchilardan oldin kelsa unda o'sha qatordan boshlab hamma pastki qatorlarda o'sha o'zgaruvchi bitta songa oshadi yoki kamayadi.
#include <iostream>
using namespace std;
int main (){
int a = 67;
int z = 16;
int c = --a + z++;
cout << c;
return 0;
}
- Agar ++,-- a yoki boshqa o'zgaruvchilardan keyin kelsa unda pastki qatordan boshlab o'zgaruvchi birga oshadi yoki kamayadi.
#include <iostream>
using namespace std;
int main (){
int a = 67;
int z = 16;
int g = a++ + z++;
cout << g;
return 0;
}
💖 💪 🙅 🚩
Abror_7
Posted on January 10, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
githubcopilot AI Innovations at Microsoft Ignite 2024 What You Need to Know (Part 2)
November 29, 2024