Difference between revisions of "Interview questions"
From Wiki at Neela Nurseries
m (2022-0-02 - Adding first technical firmware questions to initial interview questions pool.) |
m (adding to firmware interview questions pool.) |
||
Line 17: | Line 17: | ||
+ | [ ] Q: What uses and benefits of C enumerations can you describe? | ||
+ | A: (1) enumerations provide a helpful labeling mechanism for states, tasks, or cases which require conditional handling. | ||
+ | (2) enums are checked at compile time for duplicates in the given enum. | ||
+ | (3) similar to duplicate checking enums free programmers from having to adjust numeric values which adding and removing from the start or middle of an effective list, that is the enumeration. | ||
+ | [ ] Q: What are some key benefits of incorporating an RTOS in a firmware project? | ||
+ | A: Memory and CPU resource management, task scheduling, guaranteed max latency as specified by the RTOS | ||
+ | [ ] Q: When may aggregate assignment be used in a C program, e.g. assigning all or some of the values to elements of an array? | ||
+ | A: Aggregate assignments in C can happen at the point of array declaration, generally not later. | ||
+ | |||
+ | |||
+ | [ ] Q: What type of data element does the following line of C code declare? | ||
+ | 'typedef uint32_t (*command_function_t)(const char* arguments); | ||
+ | A: This line of code declares a function pointer. | ||
+ | |||
+ | Q: What does each set of parentheses express, and bring to the overall declaration this line achieves? | ||
+ | A: The first parentheses assure and clarify that the C pointer operator `*` applies to the declared newly defined type, the function pointer. | ||
+ | The second parentheses express the C data type of "function", the data type to which the type-defined pointer points. | ||
+ | |||
+ | |||
+ | |||
+ | == References == | ||
+ | |||
+ | * https://www.calleluks.com/the-four-stages-of-compiling-a-c-program/ . . . Four stages of C compilation | ||
<!-- EOF --> | <!-- EOF --> |
Revision as of 19:25, 2 June 2022
Some resources to review for firmware technical interview questions:
Starting pool of technical firmware oriented questions:
[ ] Q: What is the difference between a compiler and a cross-compiler?
A: A compiler produces executable code for the same processor family on which it runs, a cross-compiler produces executable code for a distinct processor family from the processor type on which it runs.
[ ] Q: What type of file typically are dot S files?
A: assembly source files
[ ] Q: What are the four compilation stages a typical gcc like toolchain carries out?
A: pre-processing, compilation, assembly, linking
[ ] Q: What uses and benefits of C enumerations can you describe?
A: (1) enumerations provide a helpful labeling mechanism for states, tasks, or cases which require conditional handling. (2) enums are checked at compile time for duplicates in the given enum. (3) similar to duplicate checking enums free programmers from having to adjust numeric values which adding and removing from the start or middle of an effective list, that is the enumeration.
[ ] Q: What are some key benefits of incorporating an RTOS in a firmware project?
A: Memory and CPU resource management, task scheduling, guaranteed max latency as specified by the RTOS
[ ] Q: When may aggregate assignment be used in a C program, e.g. assigning all or some of the values to elements of an array?
A: Aggregate assignments in C can happen at the point of array declaration, generally not later.
[ ] Q: What type of data element does the following line of C code declare?
'typedef uint32_t (*command_function_t)(const char* arguments); A: This line of code declares a function pointer.
Q: What does each set of parentheses express, and bring to the overall declaration this line achieves? A: The first parentheses assure and clarify that the C pointer operator `*` applies to the declared newly defined type, the function pointer. The second parentheses express the C data type of "function", the data type to which the type-defined pointer points.
References
- https://www.calleluks.com/the-four-stages-of-compiling-a-c-program/ . . . Four stages of C compilation