ya 4 Byte struct s1 will give 3 byte & int x =4 B, becoz of union max size will allocated so 4B
My brother they ask us to find expected value not probablity
expectation equal to (probability)* random variable.
Its very Lengthy question ,i can give you a way how to slove
->Draw DFA of D1-> divisible by n(0)'s 5
->Draw DFA of d2->n(A)=even
Do cross of D1 and d2 you find 10 state and select appropriate final state
From DFA find Regular expression