---
title: "Meaning of & and * in C"
subject: "Computer Programming"
chapter: 9
key: "semester_1/computer_programming:ampersand-star-meaning"
source: https://www.bctengineer.com/q/semester_1/computer_programming/ampersand-star-meaning
site: BCT Engineering
---

# Meaning of & and * in C

Computer Programming · Chapter 9: Pointers

- Asked in: 2067 Asar, 4 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_1/computer_programming/ampersand-star-meaning
- Whole chapter: https://www.bctengineer.com/md/semester_1/computer_programming/chapter-9

## Question

What are the significant meanings of '&' and '*' established in C programming?

## Short answer

& is a unary address-of operator (e.g., &x gives address) and a binary bitwise AND. * indicates a pointer in declarations (int *p), is a unary dereference operator (accessing value at address), and a binary multiplication operator.

## Answer

#### Meaning of & 
1. **Address-of operator (unary):** `&x` gives the memory address of `x`. Example: `p = &x;` and `scanf("%d", &x);`.
2. **Bitwise AND (binary):** `a & b` ANDs each bit, e.g. 5 & 3 = 1.
3. (`&&` is the separate logical AND.)

#### Meaning of *
1. **Pointer declaration:** in `int *p;` the star says `p` is a pointer.
2. **Indirection (dereference) operator (unary):** `*p` gives the value stored at the address held by `p`.
3. **Multiplication (binary):** `a * b`.

```c
#include <stdio.h>

int main(void)
{
    int a = 5, b = 3, c;
    int *p = &a;            /* & : address of; * in declaration: pointer */
    c = *p * b;             /* * : value at address (dereference), then multiply */
    printf("%d %d %d\n", c, a & b, a * b);
    return 0;
}
```

Output: `15 1 15` (c = *p × b = 5 × 3 = 15, then a & b = 1, then a × b = 15).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. In p = &x;, what does & do?
   A. ANDs the bits of p and x
   B. Gives the memory address of x
   C. Gives the value of x
   D. Acts as logical AND
   Answer: B. Unary & is the address-of operator. (Key point: Address-of operator)

2. What is 5 & 3 in C?
   A. 8
   B. 15
   C. 1
   D. 0
   Answer: C. 5 is 101 and 3 is 011; ANDing each bit gives 001 = 1. (Key point: Bitwise AND result)

3. What does *p give when p is a pointer?
   A. The address of p
   B. The value stored at the address held by p
   C. The product of p and p
   D. The size of p
   Answer: B. The unary * dereferences the pointer to the value at the address it holds. (Key point: Indirection operator)

4. Which list gives all meanings of * in C?
   A. Pointer declaration, indirection, multiplication
   B. Address-of, indirection, division
   C. Multiplication only
   D. Pointer declaration and logical AND
   Answer: A. * declares a pointer, dereferences it (unary), or multiplies (binary). (Key point: Three uses of *)

## Related in Computer Programming

- [Function prototyping](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Afunction-prototyping) — Computer Programming, chapter 6

## Related in other subjects

- [FT of DC; meaning of ESD and PSD](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Aft-dc-esd-psd) — Signals and Systems, chapter 3
