Skip to content

Comment on Why are embedded systems software developers getting a D- in C?parent

Comments

1. C Compiler Compliance question

2. Behavior of UL on a non-32 bit system according to modern standards and the compliance of compilers to that standard

and

3. That the declaration of a pointer to a constant int array was actually that. This is a prime case for using C-Decl or whatever the name of the program is that is mentioned in K&R, (or at least some googling).

All three of these should be looked up. If you have experience with a particular system that uses the last item a lot, then you possibly should not be looking that up. The other two items most assuredly should be looked up. Very very few people have the experience of writing code that works on all sorts of systems using processors of differing word size while compiling on modern compilers. Only those few souls shouldn't be looking up the answers to #1 and #2

The compiler compliance question would be good to look up if it was easy to look up. It is in fact just a bad question (I got it wrong, saying "most" where they expected "all").

Embedded developers don't usually need to look up word size issues; it's hard to do your day to day job if you don't know what an "int" is. Nevertheless, that issue actually has very little to do with the question, which you answer simply by choosing the constant that is most specific about its storage requirements.

If you don't know how const works, you probably don't use const much; keeping code const-correct (a waste of time, for what it's worth) drills this stuff into you pretty quickly. Again, it's not a great embedded dev question, but it assessess what it means to assess: whether you know how const works.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.