Pregunta de entrevista de VaaaN Infra

Explain the difference between malloc and new in C++. How do pointers and references differ in C++? How would you implement a thread-safe singleton in C++? Write a C++ program to read a file line by line using Linux system calls. What tools would you use to diagnose performance bottlenecks in a C++ program on Linux?