0

I have "converted" my prog to psedocode (I know, I should di it before writing source code" and everything is looking smoothly and easy to understand. The only problem I have is translating 2 lines involving array:

if (strcmp(full_name[index[inner]],full_name[index[inner+1]])>0)

and

temp = index[inner],index[inner]= index[inner+1],index[inner+1]=temp;

can anyone help me out? I want it to be self explanatory, so when I give this to my brother who knows nothing about programming, he could easily understand what is happening.

PS. inner, outer, invloves the indexed bubble sort.

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by DeathEvil
0
if(strcmp(full_name[index[inner]],full_name[index[inner+1]])>0)

if first string is longer than second string.

temp=index[inner],index[inner]=index[inner+1],index[inner+1]=temp;

swap.

0

if that's good enough then I have been way more specific in the rest of the program:) Thanks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.