8.6k views
0 votes
We use the __ operator to get the physical address of a variable:

A. &address
B. *address
C. &&address
D. &variable

User Jigar
by
8.0k points

1 Answer

6 votes

Final answer:

The & operator is used to get the physical address of a variable in programming languages like C and C++.

Step-by-step explanation:

The operator used to get the physical address of a variable in programming, particularly in the C and C++ languages, is the & operator (option D: &variable). In other words, when you use the & operator before a variable, you are asking the system to provide you with the address in memory where that variable is stored. This is often used when you are working with pointers, which are variables that store the address of another variable. For example, if you have an integer int num = 10;, the statement printf("Address of num: %p", &num); would print the memory address of the variable num.

User Donald A Nummer Jr
by
8.3k points