4 ms·
Static variable sure but there are many other examples, like returning a C fixed-size array from a function. I had this question asked and they specifically ins
by badtension 3y ago
Static variable sure but there are many other examples, like returning a C fixed-size array from a function. I had this question asked and they specifically insisted on being compliant with the standards and not using an out-argument. This is a ridiculous question.
- _a_a_a_ 3y ago> they specifically insisted on being compliant with the standards that's wrong?
- badtension 3y agoNo, but this is a very niche thing to know and if I remember correctly gcc has a widely used specific extension for that which would not be accepted in that case.
- mhss 3y agoBeing pedantic about standards and expecting people to recite them perfectly as a way to assess skill or seniority is what is wrong. Even when you are implementing a 'standard' there's room for robustness principles (liberal in what you accept, strict with what you send) that should be weighted instead of blindly following a 'standard'.
- publicmail 3y agoAgreed. I’ve been doing C development for the last 10 years and I’ve never seen that. I would have put it inside a struct and returned that. I hate those types of trick questions.
- mhss 3y agoI guess my point is that what you really dislike are niche pedantic gotcha questions, not 'very specific questions you can Google an answer to in 3s'. I fully agree with that btw.