c - Why &a is illegal l-value and why it is used in scanf() function then -


I'm studying pointers in C, and I'm really confusing some topics.
I searched Google and this particular site was also not understood.

I have questions about form variables:

1) one = 2 and & amp; A = 2?
2) Why the & amp; Is an illegal use as a L-val?

As far as I understand, and A = 2; is invalid & amp; An illegal L-value is because & amp; Memory address is not memory content and since the memory address is in the form of integer we can not assume the integer.

3) What happens in Scanf () function then?

I mean if we do scanf ("% d", & amp; a); take an example like why & amp; A is used here, why not * (& amp; a) does the compiler not show any type of error?

Please

Please & amp; One , because & amp; A indicates address where the variable is a stored, and that address is determined once and for all, the program can start and it can not be changed.

When using scanf , you want one or more variables scanf function so you scanf But the variables to be modified will have to pass address .


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -