increment and decrement operators in c++ with examples
Example: increment c++
int main(){
int i = 0;
cout << i << endl; //Outputs 0
i++; //Now i is 0 + 1
cout << i << endl; // Outputs 1
return 0;
}
int main(){
int i = 0;
cout << i << endl; //Outputs 0
i++; //Now i is 0 + 1
cout << i << endl; // Outputs 1
return 0;
}