This code returns 16. But if I try to add double and char that should be 9. I don't get it. Why am I getting 16? size of double is 8 and size of char is 1. Where does 16 come from?
Any time you find yourself saying something like this, you should rethink it. It obviously doesn't return the wrong value. It just returns a value that you didn't expect.
Your structure will be padded on most implementations.