Question: Question 1 C/C++ has volatile as a reserved keyword. (a) In your own words, briefly summarise why the volatile keyword is necessary, and what

Question 1 C/C++ has volatile as a reserved keyword. (a) In your

Question 1 C/C++ has volatile as a reserved keyword. (a) In your own words, briefly summarise why the volatile keyword is necessary, and what the implications of its omission might be. [2 marks] (b) Write a C/C++ program that demonstrates a situation where the volatile keyword is necessary to overcome a particular problem. You should assume that this will be written for the STM32F401RE microcontroller and your program should be complete. You should also state what would happen in the program without the volatile keyword present. This program should be thoroughly commented and can make use of any Mbed APIs that you deem appropriate. [8 marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!