Trap representation

Viewed 16792
  1. What is a "trap representation" in C (some examples might help)? Does this apply to C++?

  2. Given this code...

    float f=3.5;
    int *pi = (int*)&f;
    

    ... and assuming that sizeof(int) == sizeof(float), do f and *pi have the same binary representation/pattern?

3 Answers
Related