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.

C program input array [3] [3] = {1,2,3,4,5,6,7,8,9} print output like this = 1,2,3,6,5,4,7,8,9

Status
Not open for further replies.

KVSN91

Junior Member level 2
Joined
Aug 27, 2015
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
182
C program input array[3][3] = {1,2,3,4,5,6,7,8,9} print output like this = 1,2,36,5,

input array[3][3] = {1,2,3,4,5,6,7,8,9}
print output Like : 1,2,3,6,5,4,7,8,9
 

Re: C program input array[3][3] = {1,2,3,4,5,6,7,8,9} print output like this = 1,2,3

You want to reverse the order of digits in array[1]. There are several ways to do it but a loop is probably simplest:
i = 0;
while(i++ < 3) print(array[0]);
while(i--) print(array[1]);
while(i++ < 3) print(array[2]);

substitute your real print function in place of the 'print' I used.

Brian.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top