课堂练习

课堂练习

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 11 TC2.0 d )p + C Ð EX801.C[ = HÆÅ : __________1 A1 EX801.OBJ B1 EX801.EXE C1 EX801.COM D1 EX801.BAK 2. 1 4 d)p 7 __________1 A1 _main B1 if C1 txt D1 int enclude -max REAL k_2 sin turbo 3com _001 3"7 ! & A1 x1=27.9%3; B1 1+2=x2; C1 x3=0xa2; D1 x4=a+b=3; 41 C d ) p 7 A1 "\0" B1 "a" C1 '\x43' D1 'ab' 51 1 m,n,a,b,c,d 1 0, 1 (m=a==b)||(n=c==d)1 , m,n 1 __________1 A1 0, 0 B1 0, 1 C1 1, 0 D1 1, 1 6 d)p 7 _______1 int x=9, y=8; int a, b, c; a = ( - - x = = y + + ) ? - - x : + + y ; b = x + + ; c=y; printf("%d,%d,%d\n", a, b, c); A1 7, 7, 9 B1 8, 8, 8 C1 8, 9, 8 D1 1, 10, 9
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
7. : int i; int x[3][3]={1,2,3,4,5,6,7,8,9}; e5 : for (i=0;i<3;i++) printf("%d ",x[i][2-i]); A) 1 5 9 B) 1 4 7 C) 3 5 7 D) 3 6 9 8. p“ / s 5, main() {int x; scanf("%d",&x); if(x++>5) printf("%d\n",x); else printf("%d\n",x--); } A) 7 B) 6 C) 5 D) 4 7 e 5 1 "“/ s , a main( ) { int i, s=0; for(i=0; i<100; i+=2) s += i+1; printf("%d\n", s); } = _______________________________1 2 d )p 7 main( ) { char k; int i; for(i=1; i<3; i++) { scanf("%c", &k); switch(k)
Image of page 2
{ case '1': printf("one\n"); case '2': printf("two\n"); } } } l 12<1 > = _____________1 3 d )p 7 main() { int i,n=0; for(i=2;i<5;i++) { for( j=1;j<=3;j++) if (i%3) n++; n++; } printf("n=%d,i=%d,j=%d\n",n,i,j); } 4 1 l
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern