Bloomberg LP Interview Question
InternsCountry: United States
Interview Type: In-Person
What language and how does it crash?
In C:
- the startup code could be faulty
- gcc compiler allows you to do some funky stuff
In C++:
- define an external static duration object with some funky constructor (e.g., dereference a junk pointer inside the constructor to cause a seg fault)
- all the C stuff from above
This C++ program results in segmentation fault. It occurs in func() while trying to dereference a NULL pointer.
- Anonymous September 27, 2013