#include <iostream>
using namespace std;
void test(int x, int *y) {
*y = 5;
}
int main() {
int *a ,b =2 ;
a = &b;
test(*a, a);
a--; // a++ also give different value
This is the part i very confuse, I know if i dont put the (a--) statement the output will be 5. but what is really behind the meaning of a-- / a++ cause sometimes it give me different value as I test it with different value. I found this accidentally .
cout<<"d"<<*a<<endl;
}