> 1. an int and a class with only an int member, are they of the same size?
Maybe. The size of a class will be the total bytes of the data members and any padding. It is the padding that gets you on this question.
> 2. what is the size of a class containing 4 ints and a virtual function?
The size of 4 ints, plus padding, plus whatever storage is needed for the virtual mechanics used by the compiler.
> 2) I don't think functions occupy memory
Functions are not stored in each object, but virtual functions usually mean that each object gets a vtable, and that adds to the size of each object.