• 0

Programmers: Your favorite interview questions


Question

I haven't seen one these posts yet on this forum(if there is forgive me : )), but I figured to help out more people looking for programming work I would start a post for employers who are looking to hire new programmers what kind of questions you guys ask. I'm the technical director at a small game studio in LA, and were expanding so I also looking to see what everyone does so I can adjust accordingly.

Some of the basic questions I ask are:

What is global scope/local scope.

What is a template class

What is inheritance/polymorphism/etc.

Than some really basic logic stuff like whats a recursive function, etc etc.

Than I begin to ask a couple questions that are kind of off the wall because one thing I noticed is College graduates from big schools such as UCLA 9/10 can't figure stuff for themselves. Students are so used to stuff getting spoon fed to them, some of which is just nasty. One thing that really irritated me at one of the studios I worked at previously a couple of there senior programmers came to me and said "I don't know how to do xyz, can you help?" This normally is a pretty common thing, except when xyz happens over and over again and its something that easily be found by doing a quick google search.

I ask the interviewee if they can do something that 99% of the programmers out there can't do. They would obviously say I don't know, I would then ask them than to look it up for me on google and write out basic steps on how to get it done. Lets say I ask them how to register a custom Debug Engine in Visual Studio, first google search for "visual studio custom debug engine" which turns up http://msdn.microsof...4(v=vs.80).aspx , with a link to http://msdn.microsof...(v=vs.110).aspx. Even though the information on the latter article is actually wrong if they copied that I would be so happy. I've had guys sit there for 10 minutes struggling, and I feel that's kind of ridiculous. Every programmer in world should know how to use google :/.

Than depending on the level of the job, I would go into some more nitpicker things say in Unreal, Unity, D3D, whatever and if someone didn't know the answer I would ask them to google it and give me an explanation. I had actually had one guy who didn't graduate from a college, straight out of high school and he didn't know something I asked him, and than he immediately asked if he could go on google and look it up. I actually hired him on the spot and he ones of the best programmers I've ever had.

Anyway what kind of stuff do you guys ask?

Recommended Posts

  • 0

I'm not an interviewer, but if I was I think I would always start with the Fizz Buzz Test. Filtering out 99.5% of incompetents with such a simple question is appealing :)

Questions I've been asked:

For a game programming, C++ position:

1) Explain what is a conditional breakpoint and how to create one.

2) Write a function in C++ to inverse the endianness of an unsigned integer.

3) You have a cloud of points in 2d. Design an algorithm to draw the smallest circle that contains all the points.

For a C# position:

1) What's the most important difference between C# and C++? (IIRC I answered that so thoroughly he didn't ask any other questions :p)

  • 0

For a C# position:

1) What's the most important difference between C# and C++? (IIRC I answered that so thoroughly he didn't ask any other questions :p)

This one is kinda subjective. Different people can have different answers and (potentially) they could all be correct.

  • Like 1
  • 0

Not to do with interviews, but a quick reply to what you mentioned in your post.

In terms of using google and such, one problem is company conventions, or company specific libraries etc etc.

I just started a job as a developer, and my company has quite a lot of internally developed libraries that we can use (without any real documentation that says what the libraries include). There are also quite a lot of conventions and "done things" which restrict what kind of things we can do, and where in the code things should go. Obviously as a new starter I don't know everything that is included in the libraries or all of the conventions.

If I am struggling with something I will try to figure it out myself at first, and if that fails use google. But sometimes I will also double check with a colleague just to make sure I am not going down totally the wrong way and wasting an hour or whatever.

  • 0

I'm a lead developer at a games studio as well.

Typically we start with FizzBuzz and move from there. I focus more on finding out how the person thinks. I'm less concerned with syntax because that can be taught, while teaching someone to think logically is near impossible.

  • 0

I'm not an interviewer, but if I was I think I would always start with the Fizz Buzz Test. Filtering out 99.5% of incompetents with such a simple question is appealing :)

We use FizzBuzz and it literally filters out 95% of candidates for iOS positions as well as firmware engineers. Shocking how many people cant do it.

  • 0

"Write a program that prints the numbers from 1 to 100. But for multiples of three print ?Fizz? instead of the number and for the multiples of five print ?Buzz?. For numbers which are multiples of both three and five print ?FizzBuzz?."

I've never seen that test used in interviews myself, but gawd, if you can't do a modulus program..... and 99.5% don't get it? seriously?!

We don't even start that simple, we start out with a complex problem and see how they squirm... if they get frustrated we have an issue, if they stop think it out and write down a plan, we have a possible winner even if they don't get it, they still took the correct starting route

  • 0

I've never seen that test used in interviews myself, but gawd, if you can't do a modulus program..... and 99.5% don't get it? seriously?!

I've been asked that question. As soon as you give the solution using modulus, they ask you to do it again without using modulus/multiplication/division.

Microsoft asked me this question:

Given a matrix of numbers where all numbers are monotonically increasing from left to right across every row, and monotonically increasing from top to bottom down every column, design an efficient algorithm to search for an element in the matrix.

Then there is always the usual linked list questions.

  • 0

"Write a program that prints the numbers from 1 to 100. But for multiples of three print ?Fizz? instead of the number and for the multiples of five print ?Buzz?. For numbers which are multiples of both three and five print ?FizzBuzz?."

I've never seen that test used in interviews myself, but gawd, if you can't do a modulus program..... and 99.5% don't get it? seriously?!

We had a woman last week open up word and write out 1-100 manually. before then going through and adding the fizz-buzz. I was literally in amazement.

  • 0

We had a woman last week open up word and write out 1-100 manually. before then going through and adding the fizz-buzz. I was literally in amazement.

on a simple problem, that is overkill, but after seeing how some colleges teach programming, it doesn't suprise me....

we actually did some more "annoying" things like giving people problems in ML and LISP after giving them an introduction to it and asked them to solve a problem..

if you can take a language like LISP after given a quick tutorial on it and use it, we've definatly take you to the top of the list

learning languages on the fly is definatly something few can do

my favorite problems are data structure problems, and giving a change stacking issue where you can only flip side by side coins but they can only flip if their size is greater, how to store this, how to sort it, how to sort it efficiently etc, drives some nuts

  • 0

I've been asked that question. As soon as you give the solution using modulus, they ask you to do it again without using modulus/multiplication/division.

Microsoft asked me this question:

Given a matrix of numbers where all numbers are monotonically increasing from left to right across every row, and monotonically increasing from top to bottom down every column, design an efficient algorithm to search for an element in the matrix.

Then there is always the usual linked list questions.

see something like that would get me because I'd have to say what's your definition of monotonically, unless you had a lot of math experience you might not of heard it before to know its a function between ordered sets.. if you gave me the definition sure could code it.

I'm a languages person, I can pick up languages quickly and learn efficiencies fast... math wise though beyond Discrete math sometimes my mind goes haywire... I hated calculus, I understand it, I just hate it.. something about calculating the volume of a sea shell always drove me nuts and finding the integral that creates it ugh

  • 0

I've been asked that question. As soon as you give the solution using modulus, they ask you to do it again without using modulus/multiplication/division.

if they would tell me to do it without mod/mul/div then I'd do it in binary step by step and see if they remember how that all works using bitwise masking.. not hard to take a number in binary AND it with a mask of the binary version of the divisior - 1 to get the remainder then check from there (i know this is still a modulus by hand, but it shows you understand the workings of it at the binary level)

  • 0

if they would tell me to do it without mod/mul/div then I'd do it in binary step by step and see if they remember how that all works using bitwise masking..

You don't necessarily need binary:


using System;

class Program {

static void Main() {
int fizz = 0;
int buzz = 0;
for (int i = 1; i < 100; ++i) {
if (++fizz == 3) {
Console.Write("Fizz");
fizz = 0;
}
if (++buzz == 5) {
Console.Write("Buzz");
buzz = 0;
}
if (fizz != 0 && buzz != 0) {
Console.Write(i);
}
Console.WriteLine();
}
}
}[/CODE]

  • Like 6
  • 0

You don't necessarily need binary:


using System;

class Program {

static void Main() {
int fizz = 0;
int buzz = 0;
for (int i = 1; i < 100; ++i) {
if (++fizz == 3) {
Console.Write("Fizz");
fizz = 0;
}
if (++buzz == 5) {
Console.Write("Buzz");
buzz = 0;
}
if (fizz != 0 && buzz != 0) {
Console.Write(i);
}
Console.WriteLine();
}
}
}[/CODE]

yes, but binary is another way of doing it...

  • 0

This one is kinda subjective. Different people can have different answers and (potentially) they could all be correct.

I don't see it like that. The most important difference is that one is based on .NET and the other isn't. Everything else - the type system, garbage collection, assemblies, etc - derives from that.
  • 0

I don't see it like that. The most important difference is that one is based on .NET and the other isn't. Everything else - the type system, garbage collection, assemblies, etc - derives from that.

what if someone says well C++ can also use the CLI if you wanted to? then you have C++ in .NET under the CLI :) ... but yeah polymophism from the base type "object",GC etc etc

if you want to get technical managed C++ probably should be called MC++ but MS still calls it C++ basically

  • 0

Some of my more memorable ones:

Test questions:

  • Given the following algebraic equations, determine the value of x and y (simultaneous equations in my case, intended to test math proficiency).
  • Given a rope laid around the equator of the earth, how long is the rope? If you raise the rope 3 feet from the ground all the way round, how much longer would the rope be?
  • Design an algorithm that will print all the numbers between one and a 50,000,000 that are divisible by 13. (easy to write, but a surprising number of people don't write it efficiently).
  • Given the following code (taken from the company's codebase), what would be your best guess as to its purpose.
  • Given the following C++ code, list all the places an exception could be thrown.
  • Given the following code, what efficiency improvements do you feel could be made?
  • Given two integer variables, A and B, how could you swap their values without using a third variable? (This is my favourite. It wasn't actually given to me, but to my housemate at the time. He didn't get it, but the interviewer gave it to him to do on the train home, he figured it out on the train and emailed the answer to the interviewer, subsequently got the job :p)
  • Implement x sorting algorithm using pseudo code or a language of your choice.

Verbal questions:

  • What has been your most memorable project, and why?
  • What is your favourite programming language, and why? What do you feel are it's strengths. What are it's weaknesses?
  • What do you know about our company? (seriously, if a person didn't care to even find out what your company does, they weren't serious about joining, IMO. I admit that I fell for this one when applying for my work placement at university for a company.)

  • 0

So, I had never heard of the FizzBuzz test, decided to give it a shot, was not hard at all, my solution was less than elegant, and after reading on here and remembering module I shortened the code up by about 10 lines total.

so try 1:


static void Main(string[] args)
{
for (double i = 1; i < 101; i++)
{
Console.WriteLine((isMultOfThree(i) && isMultOfFive(i) ? "FizzBuzz" : (isMultOfThree(i) ? "Fizz" : (isMultOfFive(i) ? "Buzz" : i.ToString()))));
}
Console.ReadKey();
}
static bool isMultOfThree(double num)
{
double val = num / 3;
if (val.ToString().Contains("."))
return false;
else
return true;
}
static bool isMultOfFive(double num)
{
double val = num / 5;
if (val.ToString().Contains("."))
return false;
else
return true;
}


//The two if's could be shortened to just return (!(num / 5).ToString().Contain("."));
[/CODE]

And using modulo

[CODE]
static void Main(string[] args)
{
for (double i = 1; i < 101; i++)
{
Console.WriteLine((isMultOfThree(i) && isMultOfFive(i) ? "FizzBuzz" : (isMultOfThree(i) ? "Fizz" : (isMultOfFive(i) ? "Buzz" : i.ToString()))));
}
Console.ReadKey();
}
static bool isMultOfThree(double num)
{
return num % 3 == 0;
}
static bool isMultOfFive(double num)
{
return num % 5 == 0;
}
[/CODE]

I am not really that efficient, and I like to keep code clean (hence separate functions).

And reading the coding challenges from majestic. I decided to try the Integer one. This was how I did it in C#, 3 lines of code for swapping. Not sure if it will always work, but it does for me.

[CODE]
int a = 100;
int b = 200;


//Point is to make a == b and b == a
Console.WriteLine('\n' + a.ToString());
Console.WriteLine(b.ToString());

b += a;
a = b - a;
b -= a;

Console.WriteLine(a.ToString());
Console.WriteLine(b.ToString());
[/CODE]

  • 0

what if someone says well C++ can also use the CLI if you wanted to? then you have C++ in .NET under the CLI :) ... but yeah polymophism from the base type "object",GC etc etc

C++/CLI is a different language with its own syntax.
  • 0

It's not a complte differnet language, Managed C++ is just extensions to the C++ language that include grammatical and syntactic extensions

"C++/CLI should be thought of as a language of its own (with a new set of keywords, for example), instead of the C++ superset-oriented Managed C++ (MC++) (whose non-standard keywords were styled like __gc or __value)." http://en.wikipedia.org/wiki/C%2B%2B/CLI

C++/CLI has its own ECMA standard distinct from the ISO C++ standard, it is not designed by the same comittee, it has a different syntax, a different compiler, it compiles for a different platform.

  • 0

Haven't coded professionally for some time (about 5 years) but nice to know I aced the FizzBuzz test first time I tried it just a few moments ago in Java.

  • 0
It's not a complte differnet language, Managed C++ is just extensions to the C++ language that include grammatical and syntactic extensions

Managed C++ and C++/CLI are actually different things :-) Well, the latter replaced the former. And yes, at least C++/CLI is just a set of standardized extensions to C++.

Stroustrup's thoughts on it are an interesting read:

http://www.stroustrup.com/bs_faq.html#CppCLI

  • 0

And reading the coding challenges from majestic. I decided to try the Integer one. This was how I did it in C#, 3 lines of code for swapping. Not sure if it will always work, but it does for me.


int a = 100;
int b = 200;


//Point is to make a == b and b == a
Console.WriteLine('\n' + a.ToString());
Console.WriteLine(b.ToString());

b += a;
a = b - a;
b -= a;

Console.WriteLine(a.ToString());
Console.WriteLine(b.ToString());
[/CODE]

It's probably worth mentioning why that won't always work... what happens if a = MAX_INT - 2 and b = MAX_INT - 3? The addition of a and b will overflow...

Can you think of another operator you can use?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • AMD 26.6.2 driver brings FSR 4.1 support to RDNA 3 RX 7000 series graphics cards by Pulasthi Ariyasinghe A new driver is rolling out to Radeon graphics hardware owners, and alongside support for new games, AMD has just made its FSR 4.1 upscaling tech available to an entire generation of its products. Last month, AMD announced it is answering community requests to bring FSR 4.1 to past generations of its Radeon graphics cards. This would be starting with RDNA 3 RX 7000 products. Right on schedule, this is what's rolling out now with the AMD Software: Adrenalin Edition 26.6.2 driver containing official support for over 300 games. Following this, AMD is planning to bring out RDNA 2 (RX 6000 series) support for FSR 4.1 sometime in early 2027. As for the games, this Adrenalin 26.6.2 driver is a recommended install for anyone jumping into Ubisoft's upcoming Assassin's Creed Black Flag Resynced remake or id Software's DOOM: The Dark Ages' Revelations expansion. The two fixed issues in this release are these: Intermittent application crash or driver timeout may be observed while playing RoadCraft on Radeon™ RX 7000 series products. Purple screen may be displayed when using an HP Reverb G2 headset with SteamVR on Radeon™ RX 6000 series graphics products. The known issues AMD is still working on are the following: Intermittent application crash or driver timeout may be observed while playing Battlefield 6 on AMD Ryzen AI 9 HX 370. AMD is actively working on a resolution with the developer to be released as soon as possible. Texture flickering or corruption may appear while playing Battlefield 6 with AMD Record and Stream on some AMD graphics products. AMD FSR Upscaling and AMD FSR Frame Generation may show as inactive in AMD Software: Adrenalin Edition while playing Battlefield 6 when enabled on Radeon™ RX 9000 series graphics products. Failure to install may be observed while installing AI Bundle components in some regions with limited access to HuggingFace and GitHub. Model flickering or rendering failure may be observed in Maxon Cinema 4D and Blender on Radeon RX 7000 series and above graphics products. Users experiencing this issue are recommended to install AMD Software: Adrenalin Edition 26.3.1. Intermittent application crash may be observed on some models while running Blender on Radeon RX 7000 and above graphics products. Users experiencing this issue are recommended to install AMD Software: Adrenalin Edition 26.3.1. The newly released AMD Software: Adrenalin Edition 26.6.2 driver is now available for download from the AMD Software app. Find the official changelog here.
    • How to Do More with Less: Future-Proofing Yourself in an AI-driven Economy —was $28 now FREE by Steven Parker Claim your complimentary copy (worth $28) of "How to Do More with Less: Future-Proofing Yourself in an AI-driven Economy" for free, before the offer ends on June 30. Description In today’s workplace, headlines about artificial intelligence can feel overwhelming. With headlines swinging between promises of utopia and warnings of mass unemployment, for most knowledge workers, the truth feels unclear. In this book, Sharon Gai cuts through the noise. Drawing from real-world examples and global insights, she explains how AI is reshaping the way we work—without hype or fearmongering. Instead of choosing between blind optimism or outright pessimism, she offers a practical, balanced perspective that helps readers make sense of the rapidly evolving AI landscape. You’ll learn how to: Reskill and future-proof your career in the face of AI disruption Identify which parts of your role can be automated, and which require human creativity and judgment Use proven frameworks to evaluate AI’s impact on your work and your organization Apply actionable tips and tools to boost productivity, make smarter decisions, and do more with less Gain clarity as a parent, leader, or professional navigating what this means for the next generation Whether you’re an employee anxious about your future, a parent concerned about your children’s opportunities, or a leader managing a lean team with tight budgets, this book provides the strategies and mindset you need to adapt so you can stop worrying and start preparing. How to download for free Please ensure you read the terms and conditions to claim this offer. Complete and verifiable information is required in order to receive this free offer. If you have previously made use of these offers, you will not need to re-register. Was $28, but is now FREE | Below free offer link expires on June 30. How to Do More with Less: Future-Proofing Yourself in an AI-driven Economy The below offers are also available for free in exchange for your (work) email: The Vibe Coding Playbook: Building Your Tech Business with AI ($35 Value) FREE - Expires 6/23 The Persuasion Engine: How Any Business Can Use AI-Powered Neuromarketing to Understand and Win Customers ($28 Value) FREE - Expires 6/24 How to Do More with Less: Future-Proofing Yourself in an AI-driven Economy ($28 Value) FREE - Expires 6/30 Cloud Security Fundamentals: Building the Foundations for Secure Cloud Platforms ($131.95 Value) FREE - Expires 7/1 The Complete Free AI Learning: Master ChatGPT, Claude, Gemini & More ($21 Value) FREE How to Build an AI Design Workflow with Gamma ($21 Value) FREE The Ultimate Linux Newbie Guide – Featured Free content Python Notes for Professionals – Featured Free content Learn Linux in 5 Days – Featured Free content Quick Reference Guide for Cybersecurity – Featured Free content We post these because we earn commission on each lead so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. Other ways to support Neowin The above deal not doing it for you, but still want to help? Check out the links below. Check out our partner software in the Neowin Store Buy a T-shirt at Neowin's Threadsquad Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: An account at Neowin Deals is required to participate in any deals powered by our affiliate, StackCommerce. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through the branded deals site.
    • Microsoft admits one of the most crucial Outlook features is currently broken by Sayan Sen Microsoft is making some decent progress when it comes to Windows 11. Recently we have confirmed reports of some rather useful improvements landing in the next version of the OS, 26H2, wherein GPU driver TDR crashes may finally be fixed, plus the company is also allowing users to disable web content on the Search. On the Outlook front though things have not been so rosy. Last month in May we reported several problems affecting basic functionalities on the app. These included a problem where documents would open blank or corrupt themselves. Following that, Quick Steps, a very useful feature, would no longer work correctly, and finally, Microsoft acknowledged a problem wherein images would fail to load up properly inside the email. Microsoft had resolved those bugs later and almost exactly a month after we reported on them, the company has now admitted a new similarly basic issue, this time on Macs. Users recently started noticing that Outlook would no longer display email threads properly as the original message itself was not displayed. An affected user Tsoumpas, C (ngmb) nicely described the problem in a forum post they made on Microsoft's site. They wrote: "Description of the issue: After updating Outlook for Mac [Version 16.110 (26061317)] on 18/6/2026, replying to any email no longer includes the original message in the reply window. Prior to the update, replies correctly contained the original email text below my response. Expected behavior: The original message should be included in the reply, as in previous Outlook versions and according to the configured reply settings. Actual behavior: The reply window contains only a blank composition area (or only my response), with none of the original email text included." Obviously this must be a highly frustrating for users as noted by several in that thread. The post, at the time of writing, has also been upvoted by more than 40 users indicating that is a fairly widespread bug. Thankfully Microsoft seems to have acknowledged the problem right around that time as it opened a new issue on its official website. In the support article, the company recommends switching to Outlook for Mac from the legacy app, where the problem appears to be happening.
    • PotPlayer 260622 by Razvan Serea PotPlayer is an extremely light-weight multimedia player for Windows. It feels like the KMPlayer, but is in active development. Supports almost every available video formats out there. PotPlayer contains internal codecs and there is no need to install codecs manually. Other key features include WebCam/Analog/Digital TV devices support, gapless video playback, DXVA, live broadcasting. Distinctive features of the player is a high quality playback, support for all modern video and audio formats and a built DXVA video codecs. A wide range of subtitles are supported and you are also able to capture audio, video, and screenshots. A comprehensive video and audio player, that also supports TV channels, subtitles and skins. Its been described on the Internet as The KMPlayer redux, and it pretty much is. Daum PotPlayer 260622 (1.7.22963) changelog: Removed Kakao TV Added pause function when navigating via the navigation bar Significantly improved internal stability Fixed an issue where colors appeared strange during RGB24 processing Improved playback for some HTTP streams Improved sync processing for the built-in audio renderer Fixed an issue where certain MP4 files behaved abnormally during playback Download: Daum PotPlayer (64-bit) | 54.7 MB (Freeware) Download: Daum PotPlayer (32-bit) | 61.1 MB View: Daum PotPlayer Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Dedicated
      tuben earned a badge
      Dedicated
    • Week One Done
      mnsgroup earned a badge
      Week One Done
    • Conversation Starter
      sumytbe earned a badge
      Conversation Starter
    • One Year In
      B4dM1k3 earned a badge
      One Year In
    • One Year In
      DarkWun earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      522
    2. 2
      +Edouard
      199
    3. 3
      PsYcHoKiLLa
      94
    4. 4
      Michael Scrip
      82
    5. 5
      neufuse
      69
  • Tell a friend

    Love Neowin? Tell a friend!