let's assume array are storing five elements
list = { 1, 2, 3,4 ,1}
I want to compare array element as given below
I don't have any idea how to do that ?
1-2
1-3
1-4
1-1
2-3
2-4
2-1
3-4
3-1
4-1
Code:
#include <stdio.h>
int main()
{
int list [5] = {1, 2, 3, 4, 1};
int i = 0; const int j = 0;
for (i=1; i<5; i++)
{
if (list[j] == list[i])
{
}
}
return 0;
}