Puzzle P22


Puzzle P22 — The Usual Syntax

What does the following code write to the monitor? This is the same as the previous puzzle, but uses more common syntax in the last printf.

#include  <stdio.h> 

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

  value = 32;
  pv = &value;
  ppv = &pv;

  printf("value = %d\n", value );
  printf("*pv   = %d\n", *pv );
  printf("**ppv = %d\n", **ppv  );  /* slight sytax change */
  
  system("pause");
}


Previous Page        Answer         Next Page         Home