0
Hi guys! Just want to ask why in this code the radius is 8 even though there is no input from the user?
No input but there is an output... https://code.sololearn.com/ccl7Fn4Mn9PK/?ref=app
2 Antworten
+ 4
'int r' is a local variable, which is not initialized. So, initially it will have garbage value. In your case value in 'int r' is 8.
If u still have the doubt, print 'int r' value before updating using scanf ().