Computer Science, asked by Adityaadi6243, 1 year ago

Why do we use an ampersand in the scanf in the c language?

Answers

Answered by BhatiaAkash1234
0

By default, arguments are passed into functions by value. This means that, if we pass a variable into a function, we are not passing that variable at all, but merely a copy of that variable’s value. Inside the called function, the code might use and even alter the value of the incoming parameter, but any changes made to the parameter’s value inside that function are made only to the copy of the value, not to the original variable we passed in. Thus, the called function can attempt to alter the value of a parameter as much as it wants to, but it will have absolutely no effect on the caller’s original variable

Similar questions