Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void test1(int a, int b, int c) {
- int* x = &a;
- for(int i = 0; i < 3; i++) {
- printf("%u ", *x);
- x -= 1;
- }
- printf("\n");
- }
- void test2(int a, int b, int &c) {
- int* x = &a;
- for(int i = 0; i < 3; i++) {
- printf("%u ", *x);
- x -= 1;
- }
- printf("\n");
- }
- int main() {
- int a = 14;
- int b = 88;
- int c = 228;
- test1(a, b, c);
- test2(a, b, c);
- return 0;
- }
Add Comment
Please, Sign In to add comment