66 C interview questions from top tech companies to practice

66 C interview questions from top tech companies to practice

Your interview is approaching! Whether online or onsite, the technical C interview is likely the final step between you and your dream job. C interview questions are some of the most common technical questions, especially for roles involving embedded programming and OS. Companies like Apple and SpaceX have been known to use C. How can you make sure that you nail the C interview questions?

The key is to study the types of C interview questions you will be asked, then practice answering them using an interview platform like Leetcode. We’ve worked with hundreds of software engineers on each step of their job search and we know that a lot of time should go into interview preparation so that you can be confident and successful in your sessions.

In order to help you, we created a list of 66 C interview questions from real tech companies and included some tips for you to keep in mind during your interviews.

C interview questions

  1. Adobe question – What is the difference between malloc() and calloc()? 
  2. Accenture question – Explain some important differences between C & C++
  3. ACI Worldwide question – What is the difference between method overloading and overriding? 
  4. Google question – What is the difference between vector and arraylist?
  5. Microsoft question – What is “call by value” and “call by reference”?
  6. Facebook question – Explain dynamic memory and static memory allocation.
  7. VMWare question – What is memory allocation in C?
  8. Red Hat question – What is the difference between “var++” and “++var”?
  9. Google question – What is the use of “getch()” in a program?
  10. Apple question – What is the declaration and definition of a variable?
  11. VMWare question – Why is C a procedural language?
  12. Microsoft question – What are the concepts of OOPS? 
  13. Red Hat question – What is collision in OOP?  
  14. Infosys question – How is dynamic memory allocation done in C?
  15. Apple question – What are polymorphism, inheritance, and abstraction?
  16. Microsoft question – What is inheritance in regards to object oriented programming?  
  17. Nvidia question – What is the difference between abstract and interface classes?
  18. VMWare question – Write a program to sort numbers.  
  19. Accenture question – What is the difference between encapsulation and abstraction?  
  20. Google question – What is the difference between i++ and ++i?
  21. Intel question – How would you explain servlets to 5 year old kids?  
  22. Facebook question – What is the difference between ram memory and cache memory?  
  23. Apple question – What are the differences between open loop and closed loop?   
  24. Infosys question – What is a pointer? Give an example.
  25. 23andMe question – Implement a fibonacci sequence.
  26. VMWare question – Make an API call and display the data.  
  27. Facebook question – What is a hashtable and how does it work? 
  28. Red Hat question – What is a collision? How does a hashtable handle collisions?
  29. ACI Worldwide question – What are strings? How do you create a class which has the same functionality as string?  
  30. ACI Worldwide question – What are exceptions? What are the types of exceptions? How do you create your own exception?
  31. Apple question – What is throw and throws? How do you throw an exception?
  32. Nvidia question – What is serializable? How do you make a class serializable? What is the use of a serializable interface?
  33. Apple question – What is synchronization?
  34. Google question – If I go to a site like gmail.com, I can login and see my email. If I close my browser and turn off my computer for a few days, the next time I turn it on and visit gmail.com it shows my email without me having to login again. How does this work?
  35. 23andMe question – How do you access data from linked hashmap?
  36. Google question – What is the difference between array and linked list?
  37. Facebook question – How is JAVA more secure than C? If C is not secure, why are OS written in C?  
  38. Intel question – What is the difference between comparator and comparable interface?  
  39. Adobe question – Evaluate the sum of points based on the words in a string.  
  40. Nvidia question – How do you find the first non-repeating element in an array?  
  41. VMWare question – If a customer has an issue with the speed of the data coming back, how would you go about handling that?  
  42. Adobe question – Given a start and an end bound, return a list of all integers between the start and the end for which the digits are factors of the number.  
  43. Nvidia question – Given an array of integers and a target value, write a function that returns True if any two numbers in the array add to target value. 
  44. Adobe question – You are given an array of integers. What is the fastest way to generate an array where every integer at an index in the array is the product of all numbers in the given array except the number at that given index?  
  45. Apple question – Write a function that finds the nth fibonacci number. What is the time/space complexity? Best/worst case scenario? 
  46. Google question – How would you implement a semaphore with mutex?
  47. Apple question – How does a mobile app obtain data from a server?
  48. Adobe question – Find a string in an unsorted array of strings.
  49. Red Hat question – Search for a string in a sorted array of strings.
  50. Facebook question – How would you insert an element into an already sorted linked list to maintain sorted order?  
  51. Red Hat question – Given a binary tree, find the lowest common ancestor of two nodes.  
  52. Microsoft question – Calculate total number of manhole covers in San Francisco.
  53. Facebook question – Reverse a linked list.
  54. Nvidia question – Given a list of ranges, merge the ranges that have overlap, and return the resulting ranges.
  55. Google question – Traverse a directed graph with cycle, without having to implement hashcode() or equals() in the node class.  
  56. VMWare question – How do you implement a singleton?  
  57. Apple question – If a user is uploading images and we’re storing them somewhere… How would you name the files and where would they go? 
  58. Adobe question – You are given a rectangle’s height, width, and the x and y coordinates of its upper left-hand corner. Given two rectangles, write code to indicate when there is an intersection between them.  
  59. Intel question – What is the difference between struct and union?
  60. Microsoft question – What is the difference between OS fundamentals and sorting a stack?  
  61. VMWare question – Given an array of n numbers, return an array ans such that ans[i] contains the product of all elements in array except array[i].
  62. Nvidia question – What is the difference between thread and process?
  63. Google question – A Chinese phone is to be sold in India and language conversion is required for the phone. What are the s/w and h/w changes required to do so?  
  64. VMWare question – There is an array of size n which consists of any numbers from 1 to n. Find the numbers in the array which appear more than once. 
  65. Intel question – Write a function for reversing a doubly linked list.  
  66. Microsoft question – Explain a few sorting algorithms. What are their complexities?  

Before Diving in, Ask Clarifying Questions

Sometimes, interviewers ask intentionally vague questions. Even if it’s a highly technical C interview question, they may not provide enough context to solve it right away. Always take about 15-30 seconds to think about clarifying questions. Some examples are: “Are repetitions allowed?” or “Do you want to return permutations or combinations?”

Proactively Show Positive Signals

This is a strong tactic used by candidates who want to reduce the amount of opportunities to show negative signals. The tradeoff is time, of course. But, in general, including 30 second “tidbits” of knowledge bodes well. For example, talk about runtime and space complexity proactively, but only if you are confident.

Make Context Statements

Context statements are the difference between doing something and providing the reasoning before doing something. If you give proper context. you can change the way you are interpreted for the better. So, if you are doing something that is opinionated action, provide the rationale behind it.

Know How to Get Help

Some interviewers just hate the word, “hint” so a better approach is to ask around the word. Instead, try saying, “my assumptions are X and Y, I’m thinking of doing Z. But I’m struggling with solving [problem].” You can also ask collaborative questions like,

  • I was wondering if you had any thoughts.
  • Do you think I’m going down the right direction?
  • Do you think my assumptions are incorrect?

Ask the right kinds of questions

It’s important to ask common permission questions like, “Can I Google the C coding syntax online?” or “Is it okay if I write some thoughts down on a pen and paper?” It’s also better if you tend towards closed questions such as, “should I code this solution or think of something more optimal?” versus “What should I do next?”

With these questions & tips in your back pocket, you should be more than prepared for your next technical onsite interview. Feel like you need more help? Check out these resources to practice more software engineering interview questions.

You can also review our other interview question lists:

About Pathrise

Pathrise is a career accelerator that works with students and professionals 1-on-1 so they can land their dream job in tech. With these tips and guidance, fellows have seen their interview scores double.

If you want to work with any of our mentors 1-on-1 to get help with your c interview questions interviews or with any other aspect of the job search, become a Pathrise fellow.

Apply today

Pathrise logo
Brian Wong

Brian Wong is an experienced senior software engineer and has worked at top bay area startups and organizations. In his free time, Brian works with Pathrise SWE fellows to help them land their dream job and learn insider tips on how to ace technical interviews.

Leave a Reply

Your email address will not be published. Required fields are marked *