Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. int f(char *tab){
  5.  
  6.     int x = 0x1234;
  7.     *tab = 0x1234;
  8.  
  9.     if (tab[0] == 0x34){
  10.         tab[1] = 2;
  11.     }
  12.  
  13.     if (tab[1] == 0x02){
  14.         tab[1] = 1;
  15.     }
  16.  
  17.     if (tab[3] == 0x04){
  18.         return 5;
  19.     }
  20.  
  21.     return 0;
  22. }
  23.  
  24.  
  25. int main(void){
  26.  
  27. char tab[]={0x01,0x02,0x03,0x04};
  28.  
  29. *(tab + 3) = f(tab);
  30.  
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement