时间过去一天,整理下思绪,总结下这次电面经历。
大约一周前接到HR的电话,约好下周三(4.22)下午2点半的面试。
下午差不多时间接到电话,过程全英文。开始HR让自我介绍下,包括项目经历。准备得不是很充分,介绍断断续续的,也没有什么条理,应该给HR印象不好。
接下来就是一些技术问答。
Q:What’s your main programming language?
A: C language.
Q: What’s the difference between stack and queue?
A: Stack is first in last out, queue is first in first out.
Q: Can you give me some examples where the stack is used?
A: The compiler uses stack to store data, when a function is called, it’s parameters are put into a stack, when the compiler needs data, the stack will pop up.
Q: What is inline?
A: Inline is a mechanism that the compiler used to compile a function. When a function is defined as inline, the compiler will not compile it as a function, but extract the code in position.
Q: What is the benefit of inline?
A: Function calls costs a certain CPU and memory, when a function is complied as inline, it will save that part of the cost. But it stills looks like a function when writing the code. It’s still convenient to write and read the code.
Q: Can a recursive function be compiled as inline?
A: No, if a recursive function is compiled as inline, as it extract the code, it will be too complex for a function to be compiled as inline.
Q: How does cache work?
A: When the CPU needs to read data, it will visi