11/20/2018 0 Comments C Debugging Questions PdfI was recently asked the following question in an interview: How do you debug a C++ program? I started by explaining that programs may have syntax and semantic errors. Compiler reports the syntax errors which can be corrected. For semantic errors, various debuggers are available. I specifically talked about gdb, which is command line, and Visual Studio IDE's debugger, which has a GUI, and common commands. I also talked about debug and release version of code, how assertions should be used for debug build, how exceptions helps in automatic cleanup & putting the program in valid state, and how logging can be useful (e.g. Using std::clog). C Programming questions and answers. Freshers can download C Programming quiz questions with answers as PDF files and eBooks. Where can I get C Programming. Introduction In this tutorial, we’ll introduce a few basic tools that we need to have available when doing kernel debugging on Windows. C# - 0 C# interview. C Debugging Questions With Answers PdfI want to know if this answer is complete or not. Also, I want to hear how other people will go about answering this question in a structured manner? The answer to such a vague question can never be complete. This sounds like one of those questions that was designed to be vague on purpose: I think you should have avoided excessive waffle and asked them to narrow the focus of the question. As you mentioned, you first classify errors into syntax and semantics, then you branch your answer from there - but since you already assumed they wanted you to discuss both in depth, you simply carried on talking. Yes, what you have said is fine, but no-one here will be able to tell you if you answered the interview question. Personally, I would approached by returning a question 'why kind of C++ issue am I debugging?' ( Segmentation Fault is very different to Unexpected. As you know, but you should always make clear your assumptions in an interview) and taken it from there, once the question is narrowed enough that I would be able to answer it precisely and largely in entirety. Think of it like this: imagine they've just said to you 'my car doesn't work, can you tell me why?' Would you really start trying to answer with so little information? As an interviewer who asks very similar question frequently, maybe I can shed some light. First of all, in interviews, there are often two types of questions: (1) prove that you know something (practically speaking, these have fairly clear 'right' and 'wrong' answers), and (2) pop open your skull and show me how your mind works (these have many more shades of gray, and many very different answers can all be good). I try to make sure interviewees know when I'm not looking for the 'right' answer and just want to know how they think. For me, this question is in the second category. Think back, was the question 'How do you debug a C++ program?' Or 'How can a C++ program be debugged?' , because the answer you provided was for the second question. In general, in interviews we want to hear the general (i.e. Prodesktop 2000i pro desktop 2000i2. , there are release and debug versions of the code) and then we want to hear about how you personally used that (i.e., 'on project XYZ the Shroozlebob class wasn't initializing properly, so I loaded the debug version of the code into the debugger and.' Of course, if I got an answer like yours, I would've started asking for examples. I don't expect interviewees to be knowledgeable at being interviewing; I expect them to be knowledgeable programmers. For me, there is no one right answer to this question, although some answers are better than others. Rapidshare download manager. C Debugging Quiz Questions With Answers PdfIf you gave me your answer, and I asked for examples and you couldn't provide any, I would have to assume that you don't have very much real debugging experience. But if you gave me good examples of what you mentioned, then that would be a good answer. I respectfully disagree with @mh. This is not a trick question. I am guessing this was an attempt to start a discussion about debugging and the development process in general. Your answer is a good starting point, especially the part about assertions and exceptions. But you could have dug deeper.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |