Compatibility of pointers (C only)

Two pointer types with the same type qualifiers are compatible if they point to objects of compatible types. The composite type for two compatible pointer types is the similarly qualified pointer to the composite type.

The following example shows compatible declarations for the assignment operation:

      float subtotal;
      float * sub_ptr;
      /* ... */
      sub_ptr = &subtotal;
      printf("The subtotal is %f\n", *sub_ptr);

The next example shows incompatible declarations for the assignment operation:

      double league;
      int * minor;
      /* ... */
      minor = &league;     /* error */