C programmer Interview Questions
142
C Programmer interview questions shared by candidates
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?
2 Answers↳
not sure why you brought in VM... has nothing to do with the question....
↳
This is one of the most dumb 18th century questions that can be asked. Threads are not same for a VM and the OS. Generally, a VM is allowed a single OS thread. Under such condition, more than one time slice is not possible by multithreading. Less






If there are two circles with center point of circle 1: P1(x1,y1), radius : r1 and center point of circle 2 : P2(x2,y2), radius : r2 and Circle 1 as player and Circle 2 as enemy, then what is the function, algorithm, or your analysis to detect that player collide with enemy ?
1 Answers↳
Check whether the distance between the two center points P1 and P2 is less than the sum of radii of the circles. ||P1-P2|| <= r1 + r2 should be true. Less

C++ Asteroid game was given and was asked to fix issues and add few features.
1 Answers↳
I could not fully finish it

Write an algorithm to calculate the mean value of a set of numbers.
1 Answers↳
The trick to this question is in handling data so large that the computer needs to truncate the less significant values. For example: 10e15 on a computer would probably be stored as 1.0 e 16. Precision for a float only extends to 6 numbers (if I remember correctly) so 1 000 000 000 000 001 (1.000000000000001 e 15) would be (1.00000 e 15). The algorithm should handle special cases like this or one should be aware of this when coding. Less

C++ questions not difficult. But they provide very little time to complete it thus making it difficult for people to get through.
1 Answers↳
Obviously not very smart people behind such a technique.