Computer Science Mock Interview

Master 25 Computer Science interview questions covering algorithms, data structures, and system design.

WRITTEN BY WILLIAM SWANSEN
QUESTION 17 OF 25

Please discuss default constructors and conversion constructors.

This is a technical question which requires that you talk about two tools used in your profession. Technical questions are best answered directly and succinctly. You should be prepared for follow-up questions. The best way to prepare for an interview that involves technical questions is to review the terms, processes, and operations used in your profession before the interview. It is also good to research the company to understand the technology that it uses to be prepared to answer questions about it.

"A default constructor will either have no arguments or, if it does have arguments, they will be the default values. On the other hand, a conversion constructor can accept an argument that is different from the default. It uses the argument to create conversion rules for a class."

Community answers are written by other candidates practicing this set. Reading how others frame the same question is one of the fastest ways to sharpen your own.

Anonymous Answer

A default constructor can have no arguments or arguments that are set to default values. Conversion constructors are when the arguments can be different from the default ones.

Stephanie's Feedback

This is a great start, but I suggest providing a few additional details here to beef up your response.

Create a free account to add your own answer →
William Swansen
25 QUESTIONS & ANSWERS · COMPUTER SCIENCE
See membership