Puzzle P25


Puzzle P25 — Review

Pointers can point to a place to store a value (the place is called an L-value). Here is a program with just one level of indirection:

#include  <stdio.h> 

void main ( void )
{
  int value;
  int *pv;

  pv = &value;
  
  *pv = 47;  /* *pv on the left designates a location */
  
  printf("value = %d\n", value );
  printf("*pv   = %d\n", *pv );

}

What does the program write?



Previous Page        Answer         Next Page         Home