the difference between i++ and ++i
#include<iostream>
using namespace std;
int main() {
int i = 5;
// Post-increment: i++ increments i after the current value is used
int postIncrement = i++;
// Pre-increment: ++i increments i before its value is used
int preIncrement = ++i;
return 0;
}