Guest

Untitled

By: a guest on Sep 30th, 2010  |  syntax: C  |  size: 0.25 KB  |  hits: 78  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. #include <stdio.h>
  2.  
  3. int main (void)
  4. {
  5.     int x = 0, *pt = NULL;
  6.    
  7.     pt = &x;
  8.     printf ("Endereço de x: %p\n", pt);
  9.     printf ("Valor de x: %d\n", *pt);
  10.     *pt = 10;
  11.     printf ("Valor de x alterado: %d\n", x);
  12.    
  13.     return 0;
  14. }