Guest User

Untitled

a guest
Jan 3rd, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void test1(int a, int b, int c) {
  4.     int* x = &a;
  5.     for(int i = 0; i < 3; i++) {
  6.         printf("%u ", *x);
  7.         x -= 1;
  8.     }
  9.     printf("\n");
  10. }
  11.  
  12. void test2(int a, int b, int &c) {
  13.     int* x = &a;
  14.     for(int i = 0; i < 3; i++) {
  15.         printf("%u ", *x);
  16.         x -= 1;
  17.     }
  18.     printf("\n");
  19. }
  20.  
  21. int main() {
  22.     int a = 14;
  23.     int b = 88;
  24.     int c = 228;
  25.     test1(a, b, c);
  26.     test2(a, b, c);
  27.     return 0;
  28. }
Add Comment
Please, Sign In to add comment