Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

looping through repeated items of array with only one for

Status
Not open for further replies.

ahmedsaber

Junior Member level 1
Joined
Mar 11, 2013
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Al Jizah, Egypt
Activity points
1,449
hi all , in C :

if i have an array contains repeated scattered items , and i need to make this array has no repeated elements but i ,must use only one for loop , how can i do this ?
 

You need to compare each item with all the other items. It requires nesting a for loop inside another.

- - - Updated - - -

---------------------------

The only way you could do it with a single for loop, is if there is a one-line command in C which automatically compares all items in an array.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top