cÓïÑÔ³ÌÐò»ù´¡Á·Ï°Ìâ500µÀ£¨¸½´ð°¸£© ÏÂÔر¾ÎÄ

{ int y=10; while (y--);

printf (\

A. y=0 B. ÎÞÏÞÑ­»·,ÎÞ½á¹ûÊä³ö C. y=1 D. y=-1 ÉèÓгÌÐò¶Î int x=0,s=0;

while(!x!=0) s+=++x; printf(\

Ôò( d )¡£

A) ÔËÐгÌÐò¶ÎºóÊä³ö0 B) ÔËÐгÌÐò¶ÎºóÊä³ö1 C) ³ÌÐò¶ÎÖеĿØÖƱí´ïʽÊÇ·Ç·¨µÄ D) ³ÌÐò¶ÎÖ´ÐÐÎÞÏÞ´Î ÏÂÃæ³ÌÐò¶ÎµÄÔËÐнá¹ûÊÇ( a )¡£ a=1;b=2;c=2; while(a

{t=a; b=a; a=t; c--; }

printf(\

A) 1,1,0 B) 2,1,0 C) 1,2,1 D) 2,1,1

ÒÔÏÂÄÜÕýÈ·¼ÆËã1¡Á2¡Á3¡Á4...¡Á10µÄ³ÌÐò¶ÎÊÇ( c )¡£ A) do {i=1; s=1; s=s*i; i++; } while(i<=10) B) do {i=1; s=0; s=s*i; i++; } while(i<=10) C) i=1; s=1;

do {s=s*i; i++; } while(i<=10) D) i=1; s=0;

do {s=s*i; i++; } while(i<=10)

ÏÂÃæ³ÌÐòµÄÔËÐнá¹ûÊÇ( )¡£ #include main()

{ int a=1,b=10;

do {b-=a; a++;} while(b--<0); printf(\}

A) a=3,b=11 B) a=2,b=8 C) a=1,b=-1 D) a=4,b=9 ÈôiΪÕûÐͱäÁ¿£¬ÔòÒÔÏÂÑ­»·Ö´ÐеĴÎÊýÊÇ( c )¡£ for(i=2;i==0;) printf(\

A) ÎÞÏÞ´Î B) 0´Î C) 1´Î D) 2´Î ÏÂÃæ³ÌÐò¶ÎµÄÔËÐнá¹ûÊÇ( c )¡£ for(y=1;y<10;) y=((x=3*y, x+1), x-1); printf(\

A) x=27,y=27 B) x=12,y=13 C) ) x=15,y=14 D) x=y=27 ÒÔϵÄforÑ­»·( b ) for(x=0,y=0;(y!=123)&&(x<4);x++); A. Ö´ÐÐ3´Î B. Ö´ÐÐ4´Î C. Ñ­»·´ÎÊý²»¶¨ D. ÊÇÎÞÏÞÑ­»·

45

ÏÂÁгÌÐò¶Î²»ÊÇËÀÑ­»·µÄÊÇ( )¡£ A) int i=100;

while(1) {i=i0+1; if (i>100) break;} B) for( ; ; ); C) int k=0;

do { ++k;} while(k>=0); D) int s=36; while(s) ;--s; ÏÂÃæ³ÌÐò¶Î( d )¡£ for(t=1;t<=100;t++) {scanf(\ if (x<0) continue; printf(\ }

A) µ±x<0ʱÕû¸öÑ­»·½áÊø B) x>=0ʱʲôҲ²»Êä³ö C) printfº¯ÊýÓÀÔ¶Ò²²»Ö´ÐÐ

D) ×î¶àÔÊÐíÊä³ö100¸ö·Ç¸ºÕûÊý ÒÔÏÂΪËÀÑ­»·µÄ³ÌÐò¶ÎÊÇ( c )¡£ A) for(i=1; ; )

{if (++i%2==0) continue; if (++i%3==0) break; } B) i=32767;

do { if (i<0) break;} while(++i); C) for(i=1; ; ) if (++i<10) continue; D) i=1; while(i--);

ÈôÓÐÈçϳÌÐò¶Î int m=15; while(!m==0)

{m+=m; printf(\ÒÔÏÂ˵·¨ÖÐÕýÈ·µÄÊÇ( b )¡£ A) Ñ­»·ÌåÓï¾äÖ´ÐÐÒ»´Î¡£ C) Ñ­»·ÌåÓï¾äÒ»´ÎÒ²²»Ö´ÐÐ ÏÂÃæ³ÌÐòµÄÔËÐнá¹ûÊÇ( d ). #include main()

{ int i,b,k=0;

for(i=1;i<=5;i++) { b=i%2;

while(b-->=0) k++; }

printf(\

B) Ñ­»·Ö´ÐÐÎÞÏÞ´Î D) Ñ­»·Ö´ÐÐÁ½´Î

46

}

A) 3,-1 B) 8,-1 C) 3,0 D) 8,-2 Óï¾äif(a) x=1;Óë if(a==0)x=1;µÈ¼Û

switchÓï¾äÖеÄdefault·ÖÖ§Ò»¶¨·ÅÔÚ×îºó ´í whileÓï¾ädo-whileÓï¾äÎÞÂÛʲôÇé¿öÏ£¬¶þÕßµÄÖ´Ðнá¹û¶¼Ò»Ñù¡£ ´í CÓïÑÔµÄwhile¡¢do-whileºÍfor¼¸¸öÑ­»·Óï¾ä£¬¿ÉÒÔ½øÐÐÏ໥ǶÌס£ ¶Ô do-whileÓï¾ä¹¹³ÉµÄÑ­»·Ö»ÄÜÓÃbreakÓï¾äÍ˳ö¡£ ´í for( ; ; ) {Ñ­»·Ìå} ÓÀÔ¶ÊÇÒ»¸öËÀÑ­»·¡£ ´í Ҫʹfor(±í´ïʽ1;±í´ïʽ2£»±í´ïʽ3){Ñ­»·Ìå}²»ÐγÉËÀÑ­»·£¬±í´ïʽ2Ò»¶¨²»ÄÜΪ¿Õ¡£´í whileÑ­»·ºÍdo-whileÑ­»·µÄwhile()ºóÒ»¶¨ÒªÓÐÒ»¸ö·ÖºÅ¡£ CÓïÑÔ³ÌÐòµÄÈýÖÖ»ù±¾½á¹¹ÊÇǶÌ׽ṹ¡¢µÝ¹é½á¹¹¡¢Ë³Ðò½á¹¹¡£ CÓïÑÔÖÐwhileÓëdo-whileÓï¾äµÄÖ÷ÒªÇø±ðÊÇdo-whileµÄÑ­»·ÌåÖÁÉÙÎÞÌõ¼þÖ´ÐÐÒ»´Î¡£Óï¾ä x=3; do {printf(\ while(!x); µÄÖ´Ðнá¹ûÊÇ3¡£ ÒÔÏÂÑ­»·for (i=0; i<10;printf(\ i++;

printf(\ÊÇËÀÑ­»·¡£

ÒÔϳÌÐòµÄÔËÐнá¹ûÊÇ¡¾ 1 1 ¡¿

main() {int a£¬b;

int i=5£¬j=7£¬k=0; a=!k; b=i!=j;

printf(\£¬a£¬b); }

ÒÔϳÌÐòµÄÔËÐнá¹ûÊÇ¡¾** ¡¿ main()

{if(2*1==2<2*2==4) printf(\£» else

printf(\£» }

ÒÔϳÌÐòµÄÔËÐнá¹ûÊÇ¡¾ 20 ¡¿ main()

{int a,b£¬c£¬d£» a=c=0; b=1£» d=20£» if(a)d=d-10; else if(!b)

if(! c)d=15; else d=25;

printf(\£¬d)£» }

47

¶Ô ´í

¶Ô ¶Ô ¶Ô

ÈôÔËÐÐʱÊäÈë:3 5 /<»Ø³µ>£¬ÔòÒÔϳÌÐòµÄÔËÐнá¹ûÊÇ¡¾0.600000¡¿ main()

{float x£¬y; char o£» double r;

scanf(\£¬&x,&y,&o)£» switch(o)

{case '+':r=x+y;break; case '-':r=x-y;break; case '*':r=x*y;break; case '/':r=x/y;break; }

printf(\}

µ±ÔËÐÐÏÂÃæ³ÌÐòʱ£¬´Ó¼üÅ̼üÈëright?<»Ø³µ>£¬ÔòÏÂÃæ³ÌÐòµÄÔËÐнá¹ûÊÇ¡¾sjhiu ¡¿¡£#include main() { char c;

while((c=getchar())!='?') putchar(++c); }

ÏÂÃæ³ÌÐò¶ÎµÄÔËÐнá¹ûÊÇ¡¾** ¡¿¡£ x=2;

do { printf(\

µ±ÔËÐÐÒÔϳÌÐòʱ£¬´Ó¼üÅ̼üÈë1 2 3 4 5 -1 <»Ø³µ>£¬ÔòÏÂÃæ³ÌÐòµÄÔËÐнá¹ûÊÇ¡¾14 -1#include main() { int k=0,n;

do { scanf(\ printf(\ n=%d\\n\ }

ÏÂÃæ³ÌÐò¶ÎµÄÔËÐнá¹ûÊÇ¡¾ -1 ¡¿¡£ for( a=1,i=-1;-1<=i<1;i++) { a++;

printf(\ }

printf(\

ÒÔϳÌÐòÊä³ö½á¹ûΪ¡¾-3 ¡¿¡£ main() {

int x=-5; do

{ printf(\ while (!(x++)); }

48

¡£ ¡¿