下面程序执行后的输出结果是______。#include int main(){char c = 'A'; int k = 0;do{switch ( c++ ){case 'A': k++; break;case 'B': k--;case 'C': k += 2; break;case 'D': k%= 2; continue;case 'E': k *= 10; break;default: k /= 3;}k++;}while ( c < 'G' );printf( "k=%d", k );return(0);}
下面程序执行后的输出结果是______。#include int main(){int a = 0, i;for ( i = 1; i < 5; i++ )switch ( i ){case 0:case 3: a += 2;case 1:case 2: a += 3;default: a += 5;}printf( "%d", a );return(0);}
下面程序执行后的输出结果是______。#include int main(){int k = 0, m = 0, i, j;for ( i = 0; i < 2; i++ ){for ( j = 0; j < 3; j++ )k++;k -= j;}m = i + j;printf( "k=%d,m=%d", k, m );return(0);}
下面程序执行后的输出结果是______。#include int main(){int x = 1, y = 0, a = 0, b = 0;switch ( x ){case 1: switch ( y ){case 0: a++; break;case 1: b++; break;}case 2: a++; b++; break;case 3: a++; b++;}printf( "a=%d,b=%d", a, b );return(0);}