sakiir

Untitled

Nov 5th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. /*
  2. ** fct.c for fct in /home/dupard_e/rendus/TP_VARARGS
  3. **
  4. ** Made by Erwan Dupard
  5. ** Login   <[email protected]>
  6. **
  7. ** Started on  Wed Nov  5 14:46:05 2014 Erwan Dupard
  8. ** Last update Wed Nov  5 15:54:49 2014 Erwan Dupard
  9. */
  10.  
  11. #include <stdio.h>
  12.  
  13. int     fct(int param1, int param2, int param3)
  14. {
  15.   int       *a;
  16.   int       i;
  17.  
  18.   i = 0;
  19.   a = &param1;
  20.   while (i != 5)
  21.     {
  22.       printf("addr : %p\n", a);
  23.       printf("val : %d\n\n", *a);
  24.       a++;
  25.       i++;
  26.     }
  27. }
  28.  
  29. int     main()
  30. {
  31.   int       a;
  32.   int       b;
  33.   int       c;
  34.  
  35.  
  36.   a = 1;
  37.   b = 2;
  38.   c = 3;
  39.   fct(a, b, c);
  40. }
Advertisement
Add Comment
Please, Sign In to add comment