Operators Post and Pre-increment

int a=10;
cout<<a++<<endl; //output = 10
cout<<++a<<endl; //output = 12

@Pritam hey the first condition is post increment it print it’s actual value of original variable after that it’s incrementing it’s value by 1 so second time the value of a is nothing but 11 but second case here is pre increment it update and store new value in it so when this line is executing it store 12 by incrementing it previous value by one which is 11 so 11+1 is nothing but 12