0
All arguments in C are passed by value. That's why you need to pass a pointer(using '&') if you want a function(scanf) to be able to change a variable. Hope this helps
0
& with variable returns address of variable.
Scanf function use that address to store data in it.
0
Prince
The reason is, scanf() needs to modify values of a and b and but they are local to scanf(). So in order to reflect changes in the variable a and b of the main function, we need to pass addresses of them. We cannot simply pass them by value.
https://www.geeksforgeeks.org/use-scanf-not-printf/



