Run Sizeof on Embedded Target
In this article, let’s do one more exercise on our Embedded Target. By using the sizeof operator, find out the storage sizes of the below data types for your cross compiler.
We actually did the same thing in the earlier part of the article sizeof, where we used the sizeof operator on our machine to print out the data size values for the various standard data types available in ‘C.’
Same thing you have to do, but in this case, you have to do it for Embedded Target. After that, you can use the printf statement to print the result something similar to this.
You can create a new project. But, whenever you create a new project you would have observed here, the IDE actually creates the main function, and it adds for(;;); this statement at the end of the main function. This is called ‘C’s loop statement.
Please note that this is a for loop, and this is an implementation of the infinite loop. When the execution control reaches here, the processor actually hangs here, executing this infinite loop.
Why is it required?
We will explore that in the following article. So, keep this for loop at the end of the main function.
FastBit Embedded Brain Academy Courses
Click here: https://fastbitlab.com/course1