Advertisement
tyler569

Untitled

Apr 28th, 2014
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. void avar(int *i){
  6.     *i = 5;
  7. }
  8.  
  9. int main(int argc, char *argv[]){
  10.  
  11.     int i = 5;
  12.     int *j = &i;
  13.     *j = 5;
  14.  
  15.     int *k = (int *)malloc(sizeof(int));
  16.     avar(k);
  17.  
  18.     printf("%d\n%x\n%d\n%x\n", i, j, *k, k);
  19.  
  20.  
  21.  
  22.     printf("Args:\n");
  23.  
  24.     int m;
  25.     for (m=0; m<argc; m++){
  26.         printf("%s\n", argv[m]);
  27.     }
  28.  
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement