Pointer in C Language

Updated on November 11, 2025 | By Learnzy Academy

A pointer is a special variable that stores the memory address of another variable.
Every variable in C is stored somewhere in the computer’s memory — and that location has an address. A pointer helps you access or manipulate the data stored at that address.

#include <stdio.h>

int main() {
    int a = 10;
    int *p;      // pointer declaration
    p = &a;      // store address of 'a' in pointer 'p'

    printf("Value of a: %d\n", a);
    printf("Address of a: %p\n", &a);
    printf("Value stored in pointer p: %p\n", p);
    printf("Value pointed by p: %d\n", *p); // dereferencing

    return 0;
}

Output:--

Value of a: 10
Address of a: 0x7ffeefbff5cc
Value stored in pointer p: 0x7ffeefbff5cc
Value pointed by p: 10

 

Click here to download practice questions on Pointer

List of question on "Pointer"