Advertisement
eg0rmaffin

bllyat segfolt

Jul 5th, 2019
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6.     int a = 50;
  7.     int b = 10;
  8.     int *div;
  9.     int *mod;
  10.     ft_div_mod(a, b, div, mod);
  11. }
  12.  
  13. void ft_div_mod(int a, int b, int *div, int *mod) {
  14.     int resdiv = a / b;
  15.     int resmod = a % b;
  16.    
  17.     *div = resdiv;
  18.     *mod = resmod;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement