If your char is global, then the memory it occupies will probably be zero-initialised.
Not probably,
it is. Doesn't need to be global,
static inside a function is zero-initialized too.
Exception to this rule would be a custom startup code intentionally breaking the C standard. You know if this is the case (basically, you have written the custom startup code.)
Because this is basic 101 C and so widely trusted, I would be surprised to see buggy implementations out there. You can trust it. If it doesn't work, then ditch the niche compiler in question, it's likely completely unusable in other ways, too.
The next question would be,
when such "uninitialized" global/static are initialized to zero? The answer is,
before main() by the startup code compiler inserts. Sometimes on MCUs you need extremely short startup times which could be a reason to write your own startup code, for example performing something important
before the .data copy and .bss zeroing.
Local variables need explicit initialization. Beware, contents can be anything that happens to be in that part of memory from previous operations, this is a classic security leak, maybe you happened to store some secret nuke launch code in the same memory area before!
memset is a classic for initializing local (stack) variables. To reduce risk of bugs when modifying the code later, usage of
sizeof is recommended in the last argument.
What comes to the code examples, functionally they do the same. The former just does unnecessary work by first memseting the last element to 'A', then overwriting it to 0.
But please, copy-paste the same code which you have compiled and tested, this way you ensure there are no new typos included.