I have been googling for a few days trying to find the correct syntax in C. to print an array in a set out of order arrangement. I am new to C but know php, Java well. Am I using the wrong logic approach?
What I would like to print out is
"Here is your order, 2B 3C 1A"
I have tried using the following type of code but get,
@[2] (null)[3] (null)[1]
segmentation fault
char *aa="1A";
char *bb="2B";
char *cc="3C";
char * zz[]={aa,bb,cc};
g_print("Here is your order, %s[2] %s[3] %s[1]",zz);
thanks Art
for(i=0;i<3;i++) printf("%s ", zz[i]);, change the order you like.