Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC++strict aliasing rulesSingle-choice MCQ

Which of these accesses is permitted by the strict aliasing rules (the 'type-access' rules of the standard)?

// Assume each object's stored value is read back through the shown lvalue type. // A: int i; read via unsigned int& // B: int i; read via long& (same size as int) // C: float f; read via int& // D: double d; read via char* byte-by-byte