C Interview Questions

5,483 c interview questions shared by candidates

basically it was technical interview, it's a 20 minutes, i was asked to give a self intro, explain oops concepts in detail(with example), asked me rate on java out 5 , i answered 4, then interview asked write a Fibonacci series using recursion, queations on collection framework (what is it, examples, difference between arraylist and arrays, what is hashmap explain about it and difference between stack and queue) , what is comparator and comparable, asked me explain and to go through file handling process and some SQL questions like what is different type keys, difference drop, truncate and delete .
avatar

Gen C

Interviewed at Cognizant

3.4
Nov 25, 2025

basically it was technical interview, it's a 20 minutes, i was asked to give a self intro, explain oops concepts in detail(with example), asked me rate on java out 5 , i answered 4, then interview asked write a Fibonacci series using recursion, queations on collection framework (what is it, examples, difference between arraylist and arrays, what is hashmap explain about it and difference between stack and queue) , what is comparator and comparable, asked me explain and to go through file handling process and some SQL questions like what is different type keys, difference drop, truncate and delete .

General object oriented programming questions, such as as “what’s encapsulation, function overloading”. Some questions pertaining to C, such as “what’s the difference between structs and unions”, “where does execution start in a C program”. Then finally some basic Linux command line questions, “how to create files”, “how to check system resources”, “difference between grep and egrep”. If you use Linux and know C/C++ you will cruise through the first 2 rounds.
avatar

C/C++ Software Developer

Interviewed at Cognizant

3.4
Dec 2, 2020

General object oriented programming questions, such as as “what’s encapsulation, function overloading”. Some questions pertaining to C, such as “what’s the difference between structs and unions”, “where does execution start in a C program”. Then finally some basic Linux command line questions, “how to create files”, “how to check system resources”, “difference between grep and egrep”. If you use Linux and know C/C++ you will cruise through the first 2 rounds.

First round: Hackerrank Test. Question: Given a string which contains only A and B, remove all the occurrences of AB and BB until the string doesn't contain any of these 2 substrings. Return the length of the original string after removing all the occurrences of the above substring. eg: "ABAABBA" answer: 1 2nd Round: One-on-One Interview(Online) Questions: What is a dangling pointer? In what scenario does a pointer become dangling? What was your role in your previous company? What features did you work on for the project in previous company? What were some mistakes you made and how did you correct them? 2 predict the output questions: int a=1; print("%d\n",(a++)*(++a)); char *p = 'a'; delete a; 2 coding questions: Print a singly linked list in reverse order(A:Recursion) How to detect a loop in a linked list(A: Hare and Tortoise Algo) (Avoid using extra space) What are some projects you did and explain the one you liked. After receiving the offer: HR Assesment: Cognitive Analysis and Psychological analysis test(30 mins non-proctored simple test)
avatar

C++ Software Developer

Interviewed at Accelya Group

3.3
Sep 28, 2022

First round: Hackerrank Test. Question: Given a string which contains only A and B, remove all the occurrences of AB and BB until the string doesn't contain any of these 2 substrings. Return the length of the original string after removing all the occurrences of the above substring. eg: "ABAABBA" answer: 1 2nd Round: One-on-One Interview(Online) Questions: What is a dangling pointer? In what scenario does a pointer become dangling? What was your role in your previous company? What features did you work on for the project in previous company? What were some mistakes you made and how did you correct them? 2 predict the output questions: int a=1; print("%d\n",(a++)*(++a)); char *p = 'a'; delete a; 2 coding questions: Print a singly linked list in reverse order(A:Recursion) How to detect a loop in a linked list(A: Hare and Tortoise Algo) (Avoid using extra space) What are some projects you did and explain the one you liked. After receiving the offer: HR Assesment: Cognitive Analysis and Psychological analysis test(30 mins non-proctored simple test)

Viewing 3561 - 3570 interview questions

Glassdoor has 5,483 interview questions and reports from C interviews. Prepare for your interview. Get hired. Love your job.