I work on an embedded System – not a windows system.
I declare:
static uint_8 i = 0;
So i is defined 0 at start moment.
The question: After a reset is i redefined as 0 or does it get a junk information at the ram adress? E.g do I need to write a init function to redefine i as 0?
Thanks
This depends on your runtime library (if any). If you have an existing runtime library, it will probably initialise your static data to zero on startup (before
main()). However, some embedded systems may not have complete runtime library support so you may have to do this yourself.