下面程序的运行结果是 #include int main() { int a,y; a=10; y=0; do{ a+=2; y+=a; if(y>50) break; }while(a=14); printf("a=%d y=%d\n",a,y); return 0; }
举一反三
- 【填空题】下面程序的运行结果是 。#include<stdio.h>main(){inta=10,y=0;do{a+=2;y+=a;if(y>50)break;}while(a=14);printf("a=%dy=%d ",a,y);}
- 以下程序中,运行结果是36的有()。 A: include <stdio.h> B: define M(y) y*y int main() { printf("%d\n",M(6+0)); return 0; } C: include <stdio.h> D: define M(y) (y)*(y) int main() { printf("%d\n",M(6+0)); return 0; } E: include <stdio.h> int M(int y) { return y*y; } int main() { printf("%d\n",M(6+0)); return 0; } F: include <stdio.h> int M(int y) { return (y)*(y); } int main() { printf("%d\n",M(6+0)); return 0; }
- 以下程序没有语法问题的是() A: B: include<;stdio.h>;int main( ){int x , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} C: D: include<;stdio.h>;int main( ){int x = 3 ;y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} E: F: include<;stdio.h>;int main( ){int x = 3 ,y ; printf( "%d\n" , x / y ) ;y = 5; return 0 ;} G: H: include<;stdio.h>;int main( ){int x = 3 , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;}
- 06410141:下面程序的运行结果是()。 #include #include int main( ) { char x[80]="AB", y[80]="LMNP"; int n=0; strcat(x, y); while (x[n++]!='\0') y[n]=x[n]; puts(y); return 0; }
- 下面程序的运行结果是 #include"stdio.h" main() { int y,a; y=2; a=1; while(y--!=-1) do {a*=y;a++;} while(y--); printf(”%d,%d”,a,y); }