Pointer is a variable who holds address of different memory cell ,can change their values and much more.
int x = 10;
int y = 20;
int *p;
p = &x; // Now p holds the address of x
p = &y; // Now p holds the address of y
understand direct memory address now
the memory address of the data is part of the instruction.
Instruction: LOAD R1, 0x1000
Meaning: "Load the value from the fixed address 0x1000 into register R1.
now lets say
we initialize int *p=0x1000
but we have fixed address we cant change it
for indirect addressing mode
In indirect addressing mode, the instruction contains the location of the address, not the address of the final data. This creates the level of indirection that pointers require
Instruction: LOAD R1, [R2] //Look at the address stored inside register R2. Go to that address and load the value you find there into register R1.
now this is what we needed here R2 can be pointer which holds address itself and data
now u can perform all operation of pointer here
now array need pointer,record also need pointer
and pointer can be implement by indirect addressing mode
since index addressing mode can able to perform indirec addressing mode
henc all needed indirect addressing mode or indexed can be used