c Interview Questions | Glassdoor

c Interview Questions

271

interview questions shared by candidates

c Interview Questions

Sort: RelevancePopular Date

Given a linked list, write a function that will print the list in reverse.

2 Answers

Implement int value bit counting.

2 Answers

Given a point a, a distance d, and a large set of points, write a program that efficiently finds all of the points in the set that are less than the distance d from point a. A point consists of an x-coordinate and a y-coordinate.

2 Answers

Given a binary tree, how would you write program for getting mirror image of tree in O(n) time? Is it possible ? Assume you have no constraints on space.

2 Answers

2. what is virtual function?

2 Answers

Implement memcpy.

3 Answers

Write and aligned malloc() that gets memory size needed and an alignment mask as its arguements. Write a free() function to go with the aligned malloc that takes only the pointer to the allocated chunk of memory.

2 Answers

Write a macro to which you can pass a name of a structure and a name of one of its fields and get a relative offset of this field within the structure.

2 Answers

If you had 5 red balls that contained 4 red balls and those red balls contained the original 5 red balls, then how many sets of sets of balls would I take to have a double set of red balls of varying sizes inside each next largest red ball?

2 Answers

Describe to me in C how to take the word "FOX" and rearrange the words backwords to spell "XOF" using only a stack and one variable.

2 Answers
3140 of 271 Interview Questions