![]() |
|
HIGH MAINTENANCEPRECIOUSVALUEDWORTH ITUNIQUEPROUDHAPPYBIKERPINK PATCH 4 US $4.99
|
BLACK LEOPARD OPAL MEXICO 580Ct HIGHLY VALUED UNIQUE GEMSTONE JEWELRY GDE US $55.00
|
|
BLACK LEOPARD OPAL MEXICO 638Ct UNIQUE GERMAN FACETING EXTREMELY VALUED US $61.00
|
Valued Unique Rosewood Wood Root Carving Brush Pot US $99.99
|
|
Valued Unique Rosewood Wood Carving Brush Pot US $99.99
|
Valued Unique Follow Out Jade Carving Of Three Carps US $999.00
|
| Add Ebay Auctions to your Website |

How would I check an array in C to see if the array is unique?
Unique meaning the array values are all different.
Thanks.
You need to know the size of the array.
Then create a variable that will say if it is unique or not, usually a boolean works, but you may not have a boolean in your C, so you could use an int variable that sets it to 0 for false and 1 for true.
Then you need a for loop to go over the array. Then another for loop to go over the array again, checking if any of the elements are the same.
Something like this:
int isSame = 0;
for (int i = 0; i <
{
for (int j = 0; j <
if (i != j)
{
if (the array[i] == the array[j])
{
isSame = 1;
}
}
}
}
Then check if isSame is 0 or 1. If it is 0, it is unique.
if (isSame == 1)
{
// not unique.
}
else
{
// is unique.
}
You may want to display a message if it is unique, or return a value, or something, so I will leave that for you to do.
High Valued Fresh Water Fish Displayed at Restoran Unique 23--www.stac.com.my
![]() |
|
HIGH MAINTENANCEPRECIOUSVALUEDWORTH ITUNIQUEPROUDHAPPYBIKERPINK PATCH 4 US $4.99
|
BLACK LEOPARD OPAL MEXICO 580Ct HIGHLY VALUED UNIQUE GEMSTONE JEWELRY GDE US $55.00
|
|
BLACK LEOPARD OPAL MEXICO 638Ct UNIQUE GERMAN FACETING EXTREMELY VALUED US $61.00
|
Valued Unique Rosewood Wood Root Carving Brush Pot US $99.99
|
|
Valued Unique Rosewood Wood Carving Brush Pot US $99.99
|
Valued Unique Follow Out Jade Carving Of Three Carps US $999.00
|
|
Valued Unique Handwork Jade Carving Of Carps Creel US $799.00
|
Unique Valued Natural Rosewood Wood Carving Brush Pot US $269.00
|
|
Valued Precious Unique Handwork Jade Carving Of Horse US $899.00
|
Unique Valued Rosewood Wood Carving Brush Pot US $169.00
|
|
Valued Chinese Hanging Scroll Painting Famous Unique Luoyang Peony Flower US $149.00
|
Rare Chinese Unique Valued Bronze Kneel Man Servant Statue US $60.00
|
|
BLUE OPAL CHILE 175Ct RAREST „ELECTRIC“ COLOR TOP UNIQUE JEWELRY GRADE VALUED US $16.00
|
PINK OPAL PERU 345Ct RARE UNIQUE COLOR GERMAN CUT VALUED COLLECTOR GRADE READ US $14.00
|
| Add Ebay Auctions to your Website |

US $4.99
Leave a Reply