Hey everyone I went to the interview to a well known global firm for position of C++ developer. I had a multiple choice test of 30 questions which I answered most of them correctly but some of them were tricky and badly worded . I had a lot of time so I wrote down one of the questions which in my opinion was badly worded so there is the exact copy of the question . I just want to know if it is me or the question is intentionally badly worded. I believe that every point is count because of competition for a position.
question :
What shall the flowing call return ?
sizeof(obj1);
A. size of member functions of obj1 in bytes
B. size of the data in obj1.
C. size of member functions and the data of obj1.
D. none of the answers are correct.
I knew the answer should be size of object in bytes and I chose option C . In my opinion object contain the member functions (code segment) and data (static and dynamic allocation). The tester marked it as wrong answer .