0% found this document useful (0 votes)
34 views4 pages

Technical Interview Questions

The document contains 93 questions related to C++ programming concepts including object-oriented programming, data structures, algorithms, memory management, and game development. Some of the topics covered are templates, inheritance, polymorphism, containers like arrays and linked lists, pointers, recursion, sorting, strings, memory leaks, smart pointers, lambda functions, multithreading, collision detection, and more.

Uploaded by

Bob Brown
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views4 pages

Technical Interview Questions

The document contains 93 questions related to C++ programming concepts including object-oriented programming, data structures, algorithms, memory management, and game development. Some of the topics covered are templates, inheritance, polymorphism, containers like arrays and linked lists, pointers, recursion, sorting, strings, memory leaks, smart pointers, lambda functions, multithreading, collision detection, and more.

Uploaded by

Bob Brown
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1. What are the advantages of using templates?

2. What is the purpose of a virtual function?

3. When would a pure virtual function be used?

4. What advantages would there be to use an array?

5. What advantages would there be to use a linked list?

6. What is the difference between & and *?

7. How would you find the depth of a binary tree?

8. How to swap two numbers without using a temp variable?

9. How would you implement a swap function?

10. Write a function that checks the endianness of your system.

11. How does virtual work? How does it affect performance (both CPU and memory wise)?

12. Why is virtual destructor important?

13. What is an interface? How do you define an interface in C++? why is it useful?

14. What is the dreaded diamond? How do you deal with it?

15. What is the difference between inheritance and composition?

16. What are the advantages and disadvantages of managing game objects using OOP vs a

component-based approach?

17. What are some of the advantages with using typedefs?

18. What is the difference between shared_ptr and weak_ptr. When would you use either?

19. What is a small block allocator? What are the benefits of using one?

20. When is it unsafe to call virtual functions?

21. What is a union? Why would you want to use one?

22. What is placement new?

23. What can the static keyword in C++ be used for?

VGP452 – Senior Portfolio 1


24. Implement the atoi function.

25. What is a dot product?

26. What is a cross product?

27. What is a quaternion? Why would you use it?

28. How do you find the inverse of a matrix?

29. What is the inverse of a matrix?

30. Implement a stack class.

31. Write a function to check if a linked-list is valid.

32. Write a function to check if a point is within a rectangle.

33. Write a function to check if two rectangles are intersecting.

34. Write a function to check if two circles are intersecting.

35. How do you check if a circle intersects a line.

36. How do you check if a rectangle intersects a line.

37. How do you check if a rectangle intersects a circle.

38. How do you check if a line intersects a triangle.

39. How do you check if two triangles intersect.

40. How do you check if a sphere intersects a plane.

41. How do you check if a ray intersects a plane.

42. How do you check if a ray intersects a circle.

43. How do you check if a ray intersects a triangle.

44. Implement bubble sort.

45. How does merge sort work?

46. How does quicksort work?

47. Implement the strlen function.

VGP452 – Senior Portfolio 2


48. What is the difference between public, protected, and private?

49. What is a memory leak?

50. What is a memory stomp?

51. What are the different types of casting in C++?

52. In what order are constructors and destructors called in a heritance tree?

53. Implement the strcmp function.

54. What is the mutable keyword for?

55. What are the different ways of passing parameters to a function?

56. Write a function to check if a string is a palindrome.

57. Write a function to reverse a string.

58. Write a function to remove duplicate characters in a string.

59. Write a function to reverse a singly linked list.

60. Implement the strstr function.

61. Write a function to return the number of unique characters in a string.

62. What is a nameless namespace and why would you use it?

63. What is explicit template specialization?

64. Write a function to find the first non-repeating character in a string:("ABCA" -> B)

65. Write a function to find out longest palindrome in a given string?

66. What is a memory leak in C++, and provide an example?

67. What is the difference between delete and delete[]?

68. What are the 6 default functions of a class in C++? What are their declarations?

69. Implement an iterative and recursive version of a function that prints the fibonacci

sequence up to X iterations.

70. What is class friendship and when is it used?

VGP452 – Senior Portfolio 3


71. What is the Pimpl idiom?

72. What is the RAII idiom?

73. If two spheres are moving at a constant velocity, how can one check if they intersect

currently or some time in the future?

74. Discuss how you would write a stack allocator class.

75. Implement a smart pointer class.

76. What is a lambda function?

77. What is in a stack frame?

78. What are move semantics and r-value references?

79. What is the proudest piece of code or system that you have built?

80. What is the hardest bug that you have debugged and fixed?

81. What is thread safety?

82. What are some of the differences between C++ and C#?

83. What is RTTI?

84. What are some of the new C++11 features.

85. What is a functor?

86. What is a hash table? Is it good or bad?

87. How does A* work?

88. What is the difference between Dijkstra and A*?

89. What is the difference between a thread vs a process?

90. How do you check if a polygon is convex?

91. How would you check collision between two convex polygons?

92. How would you check collision between two concave polygons?

93. What is the difference between class vs struct?

VGP452 – Senior Portfolio 4

You might also like