Embedded C++

 16 Minutes
 8 Questions


This test is designed to assess a candidate's knowledge of technology, embedded C++, and the basics of programming. It will include questions on topics such as memory management, data structures, algorithms, and debugging. The test will also cover basic concepts such as variables, functions, classes, and control flow. Candidates should be able to demonstrate their understanding of these topics in order to pass the test.


Example Question:

Multiple-Choice
Which of the following approaches will you choose when working with low-level drivers that are called very often in high frequency interrupts with extremely time-critical code.



class led_base
{

public:
virtual void toggle() = 0; // Abstract.
};


class led_port : public led_base
{
public:
virtual void toggle()
{
// ...
}
 
 
};
void led_toggle(led_base* led)
{
led->toggle();
}


 
Approach A:



void do_toggle()
{
led_toggle(&led0);
}





Approach B:



void do_toggle ()
{
led_toggle(static_cast<led_base*>(&led0));
}