i given a question:
write a sample code to reverse the content to 12543
Code:{ int num[5] = {3,4,6,2,1}; ADD YOUR SAMPLE CODE HERE printf("%d,%d%d%d%d", num[0],num[1],num[2],num[3],num[4]); return 0; }
so i have written
Code:int i, j; for(i = 0, j =4; i <5; i++, j--) num[j] = num[i];
but then the output is 12621
i cant change the printf thing nor the num[5] things.. so what should i do to print 12643