10-pointer.c 229 B

12345678910111213
  1. #include <stdio.h>
  2. int main() {
  3. int num = 10;
  4. int *ptr = &num;
  5. printf("Value: %d\n", num);
  6. printf("Address: %p\n", &num);
  7. printf("Pointer value: %p\n", ptr);
  8. printf("Dereference pointer: %d\n", *ptr);
  9. return 0;
  10. }