Closed LinuxUsersLinuxMint closed 7 months ago
If I remember correctly, if it is a local variable (which resides on the stack) this memory location will not be cleaned, and the last value used at that address will persist. Only the global and static variables that reside in the memory assigned to the program will be reset.
Every integer (int) value created in the C programming language is 0 by default, so "int errno = 0;" This code is unnecessary, instead int errno; I changed it to.