¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita+ 7
Why is the output 100 100?
#include <stdio.h> int main() { union{ int i1; int i2; }myVar={.i2=100}; printf("%d %d",myVar.i1,myVar.i2); return 0; }
1 Respuesta
+ 2
Unions store all of their variables in the same place without offsets.