#include <iostream>
using namespace std;
int f1(int a) {
return ++a;
}
int f2(int &a) {
return ++a;
}
int f3(int *a) {
return *a + 1;
}
int main() {
int value = 2;
cout << f1(value);
cout << f2(value);
cout << f3(&value);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogICAgCmludCBmMShpbnQgYSkgewogICAgcmV0dXJuICsrYTsKfQogICAKaW50IGYyKGludCAmYSkgewogICAgcmV0dXJuICsrYTsKfQogICAgCmludCBmMyhpbnQgKmEpIHsKICAgIHJldHVybiAqYSArIDE7Cn0KICAgIAppbnQgbWFpbigpIHsKICAgIGludCB2YWx1ZSA9IDI7CiAgICBjb3V0IDw8IGYxKHZhbHVlKTsKICAgIGNvdXQgPDwgZjIodmFsdWUpOwogICAgY291dCA8PCBmMygmdmFsdWUpOwogICAgcmV0dXJuIDA7Cn0KCg==