0

Why is '&' used

7th Mar 2020, 1:29 PM
Mihir Ghumre
Mihir Ghumre - avatar
6 ответов
+ 3
In C/C++ '&' is aslo known as reference operator which is used to get pointer address of a variable
7th Mar 2020, 1:40 PM
Arsenic
Arsenic - avatar
+ 1
Thanks
7th Mar 2020, 1:34 PM
Mihir Ghumre
Mihir Ghumre - avatar
+ 1
& symbol can also mean 'address of' operator in C/C++, it's contextual. You should at least clarify your question because you didn't tag any language - while you took 3 courses (how would anyone know which?), and no code was included to point out clearly where it is used. For future reference, please follow this guide on posting decent question 👍 https://www.sololearn.com/Discuss/333866/?ref=app
7th Mar 2020, 3:16 PM
Ipang
+ 1
There are two meaning '&' is Address Extraction Operator. This is a unary oprt in C/C++/Java. It returns the address (memory location in which variable stored) of the variable on which it applied. Example int n=10 &n gives you the address of location where n is stored This is also a Binary oprt, that's called Bitwise AND oprtr.
8th Mar 2020, 8:09 AM
Akbar Ali Quazi
Akbar Ali Quazi - avatar
0
Please clear my doubt
7th Mar 2020, 1:29 PM
Mihir Ghumre
Mihir Ghumre - avatar
0
“&” is used for many things, to say “And”, in JS (Javascript) is used for Logical Operators “&&” Returns true, if both operands are true.
8th Mar 2020, 2:20 PM
DevX