1 votes 1 votes What is the size of the following union? Assume that the size of int=2, size of float =4, size of char=1 union tag { int a; float b; char c; }; 2 4 1 7 Programming and DS ugcnetsep2013ii programming-in-c + – go_editor asked Jul 21, 2016 recategorized May 24, 2020 go_editor 3.6k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Answer B 4 size of the union is the same as the size of the largest member. Here float has largest size =4 sh!va answered Jul 21, 2016 sh!va comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes since union stores all elements at same location so it takes largest data type size which is float here this are of 4 bytes are also used by int and char too so ans is B 4 bytes Sanjay Sharma answered Jul 21, 2016 Sanjay Sharma comment Share Follow See all 0 reply Please log in or register to add a comment.