Amazon Interview Question for Software Engineer / Developers

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

for Header Files
Rule: Header files must be completely documented. This means every class, method, and data member must have comments. Header files describe the interfaces of the system, and as such, should contain all the information a developer needs to use/understand the interface.

for CPP Files
Rule: The quantity/quality of the comments in a CPP file is left to the individual developers to decide. If the corresponding header file is completely documented, comments in the CPP file add little value.

Rec: Add comments whenever you feel that the code is complex, non-standard, and/or clever. Remember if you want the luxury of other people maintaining your code – they must be able to understand it!

ffor Use doc++ Comments in Header Files
Rec: Document your code so that an external tool can extract the information stored in your header file comments. For example doc++ and doxygen are freely available tools that are able to generate online (HTML) and offline (Postscript, man pages, etc) documentation from the raw source code. Detailed information on doc++ and doxygen can be found at:, The following are examples of doc++ comment styles.

/** This abstract class …


class FooBar {


/// Enables the Widget to begin sending data

virtual void enableWidget() =0;


- bala February 22, 2006 | Flag Reply
Comment hidden because of low score. Click to expand.
of 0 vote


- Anonymous March 25, 2008 | Flag Reply

Add a Comment

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


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


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