F01 Answer


a=77    *pa=77


#include <stdio.h>
int main( void )
{
  int  a ;
  int *pa ;
  
  a = 77 ;
  pa = &a ;
  
  printf("a=%d   *pa=%d\n", a, *pa );
  
  system("pause");
  return 0;
}

Comments:

The variable a is declared to be an integer variable. The variable pa is declared to hold a pointer to an integer. Notice that the name of the second variable is pa. The name does not include the asterisk.

The variable a is assigned the value 77. Then pa is assigned the address of a. (Another way to say this is that pa is assigned a pointer to a.)

In the printf() statement, the first value printed comes directly from a. The second value is found by following the pointer in pa. (Another way to say this is that pa is dereferenced.)