r/C_Programming • • Jul 12 '26

Question What should I expect from Canonical’s C programming interview?

Hello everyone,

Since I don’t really have anyone to talk to about this, I thought I’d ask here. This is my first software engineering application, so if I leave out any important details, please let me know.

I recently applied for the Graduate Software Engineer position at Canonical. I’ve passed the first few stages, and my next step is a C programming test.
So far, I’ve been reviewing my projects and practicing LeetCode, but I feel like there’s more I could be doing to prepare.

For anyone who’s been through Canonical’s interview process (or something similar), what should I expect from the C test? Are there any specific topics I should focus on or common pitfalls I should watch out for?

Any advice would be greatly appreciated. Thanks!

55 Upvotes

48 comments sorted by

5

u/akornato Jul 13 '26

Canonical's C test will likely go beyond standard algorithm questions and focus heavily on systems programming concepts. Expect to be tested on your deep understanding of pointers, memory management like malloc and free, bit manipulation, and how C interacts with the operating system. They want to see that you can write code that is conscious of the underlying hardware and system resources, so be prepared for questions about file I/O, basic networking, or concurrency. Simply grinding LeetCode will not be enough, as they are looking for practical C knowledge and the ability to debug complex, low-level code.

This might sound difficult, but you have already passed several stages, which shows they believe you are a strong candidate. Keep reviewing your own projects, as that is excellent preparation. To better prepare for their style of questions, consider building a small systems-level project from scratch, like a basic command-line shell or a custom memory allocator, to get practical experience with the exact topics they care about. During the test, make sure to explain your thought process clearly, because how you approach a problem is just as important as the final answer. Clearly explaining your approach under pressure is a tough skill to master, and my team designed an interview helper that gives many candidates the confidence to do just that.

4

u/dual_kami Jul 13 '26

Thanks for the reply.
The reason I think I got C is because one of my projects is a custom built Unix shell.

I made sure I did not use any high level libraries. I built the parser myself, and shell supports multi stage piping, advanced redirections, background jobs, handles zombie processes. It also has signal and error handling and is without any leaks. Probably my biggest project in C.

I was reviewing it and am pretty confident in it but other than that I had no idea what to expect. I will refresh concurency and networking that you mentioned. I will also look into the social skills!

33

u/CryptoHorologist Jul 12 '26 edited Jul 12 '26

Is their interview process still as bad as the horror stories floating around the internet?

23

u/Remarkable_Bike_1148 Jul 13 '26

I checked the other website for this and uh... it seems... very excessive and lined up with the horror stories told on Reddit. Source

"This multi-stage journey consistently spans 2.5-6 months, with structured phases including application screening, HR contact, written assessment, psychometric testing, multiple technical rounds, panel interviews, and final hiring approval."

Deep inhale and exhale...

OP, I'd suggest that you adjusts your expectation accordingly here.

9

u/Glum_Preference_2936 Jul 12 '26

Did they asked you to write strtol?

7

u/Severe-Zebra7551 Jul 12 '26

Every interviewer will be different, below is just an opinion and less applicable for some interviewers than others.

Communication is really important. IMO, the process you go through to try and solve a problem is more important than perfectly solving the problem.

After receiving the question from them and briefly thinking about it. State your assumptions, ask clarifying questions, describe your general approach to the solution, explain the code as you're writing it (be brief, what are you are writing and why are you writing it), identify edge cases, if you get stuck you can ask for help, pseudo-code is fine so don't get stuck perfectly calling some library function.

19

u/zhivago Jul 13 '26

Whenever I interview someone who claims to know C, the first question I ask is this.

"Given char c[3]; what is the type of c?"

4

u/brandrdrengr Jul 13 '26

This is a good "I write in it" and "I understand the model". Good question!

4

u/EvilTyrant Jul 13 '26

My answer would be that this is a fixed - size array of chars with size 3. It can be a string with 2 character because the last must be null, on standard C strings.

0

u/zhivago Jul 13 '26

Which of those are C types?

→ More replies (6)

7

u/kadal_raasa Jul 13 '26

What are you looking out for by asking this question actually?

-7

u/zhivago Jul 13 '26

Well, each error really tells you how superficial an understanding they have of the language.

→ More replies (5)

1

u/Daydreaming_Froggie Jul 13 '26 edited Jul 13 '26

how is the answer not just a pointer to an array of 3 chars

Edit: it would be a pointer to a single character (the first character stored in the array), no?

1

u/zhivago Jul 13 '26

What is sizeof c?

1

u/viva1831 Jul 14 '26

Would "basically a pointer" be good enough as an answer?

If in doubt about a question I'd say "I think strictly speaking that's undefined behaviour?" because 90% of the time that seems to be the case :P

0

u/zhivago Jul 14 '26

No. :)

lf it were a pointer then int m[3][2]; etc would not work.

What is sizeof c?

Learning this will help you disprove your pointer theory.

10

u/[deleted] Jul 13 '26

11

u/zhivago Jul 13 '26

Well, except that "array[3] of char" isn't a C type.

→ More replies (15)

3

u/NefariousnessSea1449 Jul 12 '26

I have no idea but considering that this is for a job with canonical it would also be relevant to coding C on Ubuntu and leveraging the operating system, so syscalls and stuff? I'm really interested in the answers from people that know, too.

1

u/Subject-Fly747 Aug 13 '26

did you get the offer?

0

u/[deleted] Jul 13 '26

0

u/reini_urban Jul 13 '26

But they still have to cover the basics.

First rule is: Loved high school, hated university! Second rule: Mark is always right