+ 2

In 'C' How much memory will be reserved for this code?

union student { char name[10]; int roll_number; float percentage; }

3rd Feb 2018, 2:33 PM
ImranKhan CD
ImranKhan CD - avatar
2 Réponses
+ 8
10 bytes for 10 chars because union reserve memory just for variable with largest size
3rd Feb 2018, 2:46 PM
Vukan
Vukan - avatar