C developer Interview Questions | Glassdoor

Find jobs for c developer

C developer Interview Questions

347

c developer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Sequence of numbers in random order and 1 of them is missing how to find that out...

5 Answers

N(N+1)/2 - sum of the input = missing number

It isn't stated that sequence starts from 1. The sequence could be 8,9,5,6!

If the sequence is guaranteed to contain only positive integers, it can be done like so: Read in the sequence, noting the MIN and MAX numbers. The sum IF it started from 1 would be MAX(MAX-1)/2. The sum of the 'missing' numbers (from 1 up to where the sequence actually starts) is (MIN-1)*MIN/2. The missing number is given by taking the difference between the two: X = [MAX*(MAX-1) - (MIN-1)*MIN]/2.

Very simply question of inserting latest 5000 records in container along with timestamp and retrieve them as needed and discard which are older then 5000.

4 Answers

New shares report data on a minute to minute basis with additional information. Please describe how to perform this change without affecting old shares data

4 Answers

basics oops questions

2 Answers

5 adjacent parking spots. whats the probability 2 cars next to each other

2 Answers

int a=3, b=5 cout<<a & b<< a | b << a && b << a || b;

2 Answers

Something to do with void main().

2 Answers

If you were designing a multi-threaded program to crunch numbers and do highly cpu intensive processing would you expect a single threaded program to do better or one using 50 threads and why?

3 Answers

One or more comments have been removed.
Please see our Community Guidelines or Terms of Service for more information.

well all questions are expected, string reverse without reversing words for example " this is sentence" => "sentence is this", write c++ code to do so

2 Answers

Q: Check if a number is a power of 2. Q: Write code for pair-sum(a version of subset sum where the sum of two number is equal to the expected sum, rather than optimization problem, it is decision problem) problem. How to solve it in O(n lg n) and O(n) time. Q: What is the difference of pointer and reference in C++. When to use those ?

2 Answers
110 of 347 Interview Questions