Aricent Interview Question for Software Engineer in Tests






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

i guess it called access violation error.
to avoid such errors make the value of pointer to null just after deleting it, that way it will be ignored by the next delete operation( no-op ) and the error can avoided.

- nitesh October 24, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

nitesh is right

- shoushou January 11, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

this is what dangling pointer

- Deb kumar June 05, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

So nitest, anytime I get an Access Violation, is it because of deleting twice?


It is called a double delete. Depending on the implementation of the memory manager, it may or may not cause an Access Violation. Calling this as "Access Violation" is pretty silly. Acess Violation is something that _might_ happen as a result of double delete.

Calling it a dangling pointer is backwards. It is something which hasn't been deleted at all.


Best way to avoid double deletes is to move to C# or Java :).

If that cannot be done, use auto_ptr like class.

If you cannot do that, code more carefully, set it to NULL after delete etc. But, if you aren't using auto_ptr, expect bugs in the code.

- LOLer June 05, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Just shut your mouth up and stop giving suggestions regarding C# and Java. Answer only what is answered!

- LOler DADDY July 22, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Wow! I am amazed at your abiwity to extract a concise summary of what others are tawking about.

I have to disagree on one point though, if I answer what is awready answered, I won't add much to the discussion, would I?


Yours truwy,
your son.

- LOLer July 23, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

oh i love u LOLer..
i'v been reading ur comments in most of de questions n now i'v bcm ur fan..
:)

- varsha September 09, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

it is implemetation dependent in gcc we get memory access violation.
Moreever heap may get currupted

- kamlesh July 25, 2011 | 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