The code should not even compile let alone do anything as expected :)
The first thing is the array declaration. This:
int adjacency [dimension][dimension];
should give an error ('expected constant expression' or something like that). If you want to be able to change the size of the array you can either use a define:
#define DIM 5
...
int adjacency [DIM][DIM];
or use the 'new' operator to create the array.
As for the file reading - you should probably post the contents of the file - otherwise there's no way to know what you are trying to read.
I would also suggest checking if the file was oppened correctly before reading anything...
if( f != NULL )