KLA interview question

Lot of stuff with pointer and memory usage.