Multiple choice

When applied to a variable, what does the unary & operator yield?

  1. The variable's value.

  2. The variable's binary form.

  3. The variable's address.

  4. The variable's format.

  5. The variable's right value.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The unary & operator in C, when applied to a variable, returns the memory address of that variable. This is used for pointer operations and passing references to functions. Option A is incorrect because the variable's value is obtained by simply using the variable name. Option B describes a nonexistent operation. Option D and E are not valid C concepts.