1.
Code:
int i;
int x[i],frequency[i];
You can't declare arrays this way, i is unknown.
Code:
const int n = 3;
int x[n];
int frequency[n];
2. The "i" in the first for loop hides the local "i". This is a different variable with the same name. Don't do this.
3. The statement "frequency[i]=0;" which is outside of the loop is invalid. I have no idea what you wanted to achieve with this. You should remove it.
4. The second loop should compare the current frequency (result of increment) with the frequency of the most frequent number (you need an additional variable for this).
5. I have no idea what you want to achieve with the code, which is outside loop.