Bloomberg LP Interview Question
Financial Software Developers1. From which memory do static variables get allocated??
data segment
2. Indirectly asking about virtual destructor?
balabala
3. If u have 1K as ur heap memory can a call to malloc(1 K) succeed??
no
4. what is the difference between static variable and local variable?
balabala
5. Hash a string of length 100 ? he was asking me a hash function?
simple hash, just divided by the size of hash table.
1) Static vars ==> From DS memory of the proces
- days September 14, 20082) Straight forward
3)nope. Some extra mem is required for housekeeping
4)static from DS and local from stack
5) Straight forward