I have a problem with comparing strings.
What i need is to write a program that reads a file input with numbers and strings, and put the numbers in one array x[] and the characters in another one y[] (characters with only one letter), and then compare the characters. But the comparing process does not work, and i do not know why. I am realy stuck in here.
Here is the code:

Code:
#include <stdio.h>
#include <string.h>

#define MAX 100
#define N "N"

void main()
{
unsigned int max, min;
int x[MAX];
char y[MAX], z[MAX], buf[3];
FILE *file;
int i, j;

file = fopen("SPRATOVI.IN", "rt");

fscanf(file, "%d", &j);
max = 0;
min = 0;
for(i = 0;i < j;i++)
{
fscanf(file, "%d %c%c", &x[i], &y[i], &z[i]);
printf("%d %c\n", x[i], y[i]);
}
for(i = 0;i < j;i++) 
{
if(strcmp(y[i], N) == 0)
{
if(x[i] > max)
{
max = x[i];
}
}
else {
if(x[i] < min)
{
min = x[i];
}
}

}
return;
}
The first for loop with the printf() is fine - i get the numbers and chars on screen.
There is a problem with the second one, i.e. the strcmp() function, and i get just segmentation fault error. I have tried different methods for doing this, but no success.

Please somebody help,
Thank you.