An array is a collection of data values of the same data type.
Example:
int myarray[4]= {1,2,3,4};
char blah[50];
The 1st line above creates an array of 4 integers and initializes the array to 1, 2, 3 ,4.
Array elements 0-3 (remember that computer numbers start at 0, not 1) would contain the integer numbers 1, 2, 3, and 4.
The second line creates an array which holds 50 chars, but I didn't set the values for each element in the array.
You can read or write to one of the elements in the array like this:
char foo;
myarray[2] = 5; // set 3rd element to value 5
foo = myarray[2]; // foo = 5
A pointer is a special type of variable; It holds a memory address. The data type that you declared for the pointer variable tells the compiler the type of data that the pointer points to.
If you increment or decrement the pointer, then the memory address that the pointer contains will increase or decrease by the type of data that the pointer points to.
This is why you specify the pointer's data type when you allocate a pointer.
Example:
char *fuzz; // pointer will hold the address to a char variable
int *fuzzy; // pointer to an int variable
char ack=5;
int buzz=45;
char result;
fuzz=&ack; // fuzz holds the address of ack, not the number 5!
fuzz=&buzz; // warning! buzz is an int, and fuzz is supposed to contain the address to a char variable
fuzzy=&buzz; // good
result = *fuzz; // de-reference fuzz. Since fuzz points to ack, which equals 5, then result equals 5 -- not the address that fuzz contains.