0
Why is it good practice to assign NULL to a pointer when declaring it?
1 Resposta
0
Since, a pointer can point to anywhere in the memory area, to keep the variable hold a valid memory location and not garbage. So to keep dangling issues aside a good practice is to assign NULL when declared.