+ 1
C++ arrays inizialization
Try and execute this code: https://code.sololearn.com/c1uONqAVZ5af/?ref=app without Initializing arrDigits. You'll get a lot of random results, especially if you execute code several consecutive times. Why? Shouldn't arrDigits be automatically initialized to all zeroes?
2 Respostas
+ 3
Seems it depends on sololearn compiler. Needs initialization manually. Good code by the way, easy to understand and follow.