VMWare Inc Interview Question for Software Engineer / Developers






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

C Memory manager keeps track of size of bytes which is allocated. This info is generally kept in the byte location pior to pointer location returned by malloc.

- Deepak May 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Correct !

Some times, s/w will have it's own wrapper over C memory manager, to store other details as which file/line has called for memory allocation...
These things help in debugging

- Shoonya May 17, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

C Memory manager keeps track of size of bytes which is allocated. This info is generally kept in the byte location prior to pointer location returned by malloc.

- Deepak May 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

What if we increment the pointer twice and then call free?? Now the pointer has moved 2 places forward.
How does it still de-allocates the complete memory block??

- Heramb April 09, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

See C++ FAQ [16.14]

* Over-allocate the array and put n just to the left of the first Fred object.
* Use an associative array with p as the key and n as the value.

- creation May 20, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

It's not c++ questions at all , no body uses malloc in c++.

- atulkumarpccs August 31, 2017 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

This isn't C++ questions. Only dinosaurs use malloc in C++ code.

- Anonymous May 18, 2010 | Flag Reply


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