Apr 22, 2025
& operator to get the memory address of a variable.int myAge = 43; // an int variable
printf("%p", &myAge); // Outputs the memory address of myAge
* operator:
int* ptr = &myAge; // A pointer variable storing the address of myAge
*)** operator is used to dereference a pointer, accessing the value stored at the address.printf("%d\n", *ptr); // Outputs the value of myAge (43)
* in declaration creates a pointer, elsewhere it dereferences a pointer.int* myNum;
int *myNum;