+ 1
Can any one tell me that sum of any two have always the same output 8
5 Respostas
+ 5
Darren Gonsalves, the problem is that you are using a and b before assigning a value to them.
Rewa Mathur, it has nothing to do with the size of int. By default, uninitialized variables just have any value that happens to be in the memory that was assigned to them, ie garbage values.
See for yourself:
https://code.sololearn.com/cywa3kqT77ZB/#cpp
(Otherwise, your code is fine.)
+ 1
Thanks