Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void incrementa (int *valor) {
- (*valor)++;
- }
- int main (){
- int x = 10;
- int *p = &x;
- cout << x << endl;
- incrementa (&x);
- cout << x << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment