C Pointers
A pointer holds an address. The & operator gets an address; * dereferences it. Only dereference a valid pointer.
C
#include <stdio.h>
int main(void) {
int score = 91;
int *pointer = &score;
printf("%d\n", *pointer);
return 0;
}A pointer holds an address. The & operator gets an address; * dereferences it. Only dereference a valid pointer.
#include <stdio.h>
int main(void) {
int score = 91;
int *pointer = &score;
printf("%d\n", *pointer);
return 0;
}