FlexTrade Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
1
of 1 vote

Generally size of float is 4 bytes and size of double is 8 bytes. so Size of object will be 16 bytes.
if a static double, then size will be 8 bytes because static variables are not allocated on stack. they are global for class.
If all member variables are static then size will be 1 byte not zero because an object should have an address to show its existence....

- Anonymous March 30, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

very good..in general term of answers.
But they again, the interview needs to be specific..or you need to be specific to 'show him up'. There is a difference in size of the class if the order of the float and doubles are rearrange. the answer can also easily be 24 instead of 16. Try it. It has to do with class and struct paddings alignment. Also if you add pointers to it, then you also have to pay attention to if the machine is 32-bit or 64-bit.

Man, these interviewers needs to be specific or they just don't 100% know their stuff

- Anonymous May 02, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

The reason interviews in most companies are not specific is because they want the candidate to come up with assumptions and solve the questions.

The first answer was correct and was simple
The second answer showed more in depth analysis - implying the candidate goes into details.

- Anonymous October 05, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Why would an object with all static members be 1 Byte big? An address is 4 Bytes long.

- New Yorker May 25, 2014 | Flag


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More