eg0rmaffin

pointer to 42

Jul 4th, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.17 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void putint(int a)
  4. {
  5.     printf("%i    ", a);
  6. }
  7.  
  8. int main() {
  9.     int a;
  10.     int* b;
  11.     b = &a;
  12.    
  13.     *b = 42;
  14.  
  15.     putint(*b);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment