Ho sostenuto un colloquio presso NVIDIA (Israel, TX)
Colloquio
About C++:
What is the difference between stack and heap memory in C++?
Can you explain RAII (Resource Acquisition Is Initialization) in C++?
What is the role of the "virtual" keyword in C++?
How does C++ handle memory management compared to other languages?
How do you implement polymorphism in C++?
Can you explain the difference between deep copy and shallow copy in C++?
What is the difference between "new" and "malloc" in C++?
How does exception handling work in C++?
What are the advantages of using templates in C++?
About Your Background:
Can you describe a challenging C++ problem you’ve solved in your career?
How do you stay current with the latest advancements in C++?
What is your educational background in computer science or engineering?
What skills do you think set you apart in the field of C++ programming?
Domande di colloquio [1]
Domanda 1
how abstract classes works behind the scenes in memory
Ho presentato la mia candidatura online. La procedura ha richiesto 2 settimane. Ho sostenuto un colloquio presso NVIDIA (Mosca, ) nel mese di ago 2018
Colloquio
I participated in one on-site interviews at NVidia. Interview were split into 2 parts of 1-hour long sessions with different teams. Be prepared to write your code on white board.
Suppose we have std::vector< std::string > with N strings and no reserved space. We want to add one more element to vector. How to implement push_back() most efficiently?
Suppose we have std::vector< UserType > with N elements and no reserved space. UserType is some complex user type. We want to add one more element to the vector. How to implement push_back() most efficiently?
We need to implement variadic template function that takes arbitrary number of arguments of unknown types and it should return sum of the arguments with type int.
We have pointer to 2D array of size NxM - int** A. We need to get value of element A[3][4], but we can not use ‘[’ and ‘]’. How we can do it if we know that such element exist?
Suppose we have class A that is publicly inherited from classes B and C. Also class A contains member variable of class D. We know that constructor of class B throws exception. If we would create object of class A, in which order constructors and destructors will be called?