Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

C has very weak typing. It lets you type-cast memory to different types, allowing you to apply operations of one type to apply to data of a different type. However, the internal representation of most types are system-dependent. Consequently, applying operations that expect a certain type of data will yield unexpected results when applied to data of the wrong type. Furthermore, applying Applying operations on improper types will likely yield non-portable code , due to the platform-dependent representation of the dataand produce unexpected results.

Non-Compliant Code Example (Ints vs. Floats)

...