labexam_3_0506b - „2 ƒ‚ f dc p ‡ 5 ) ) ( † … ) )...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: „2 ƒ‚ f dc p ‡ 5 ) ) ( † … ) ) ge†Hh “44!™94!( ~ T!) f †# ‚€ ƒh ) €t1Qg`!Y 2 TSTY'!o4SiTS–oe†H”T1™Qn`Y‘TSRrHw3QsQ1S3eySD ux € P I jX B I @ D U G X B D G D I @ D P D dc p h E d B P I jX B  I @ D P t j P ~ P p I f I D dc G P f dc p D P I @ D PD p I  d G ˜ ~ Pp I f I D dc D d I P I p h I p D B @ D P f dc p D ‰ge†|™TSorC33†4Qsr!!Se¦3QpQSHrS¦S}rTe††|P 2 oCq{qe#QCSz!srCSHiy†‡†…97 x P D j h P dc D B @ D t B p f G p h B I Dc p 8 ‚€ wh ) vt1srSs’aip1oSQs1areˆg1qsrSs‰ap1oSQnHHmec ux € Pp I DD IX I P B˜ p I b GX dc E d B Pp I DD IX I P B˜ p I h h j d I dcX I @ D D j h D j h g ) f e P d B p p B p B @ ˜ B G D dc D • I D U G I dcX B P D I f D B @ D t B p f G p h B I Dc p 8 ge`lTS–Cq†Cki€ ¨4) sY—Qs†1™1S——Se–1SS#Y”ge`“is’!‘CS1s‰qSHˆy†‡†…97 „ 5))(02)0) 44!43!1¨!( int main() { int a[ SIZE ] = { 2, 6, 4, 8, 10, 12, 89, 68, 45, 37 }; int i, pass, hold; ‚€ ) x v D dc p h t B p f G p h f dc b GXX G U I @ D P I G E D B @ 8 7 ƒh 2 yweHu!srqSHige¨a`YWVTSRQCHFCA96 & $ "    © § ¥ £ ¡ '%#! ¨¦¤¢ #include <stdio.h> #define SIZE 10 } for ( i = 0; i <= SIZE - 1; i++ ) printf( "%4d", a[ i ] ); printf( "Data items in original order\n" ); for ( i = 0; i <= SIZE - 1; i++ ) printf( "%4d", a[ i ] ); for ( pass = 1; pass <= SIZE - 1; pass++ ) printf( "\nData items :\n" ); return 0; printf( "\n" ); for ( i = 0; i <= SIZE - 2; i++ ) if ( a[ hold a[ i a[ i } i = ] + ] > a[ i + 1 ] ) { a[ i ]; = a[ i + 1 ]; 1 ] = hold; /* one comparison */ /* one swap */ /* one pass */ /* passes */ ...
View Full Document

Ask a homework question - tutors are online