下面程序段执行后的输出结果是( )。int a[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 }, *q[4], k;for ( k = 0; k < 4; k++ )q[k] = &a[k * 3];printf( "%d", q[3][0] );
A. 8
B. 16
C. 20
D. 输出不合法
查看答案
下面程序执行后的输出结果是( )。#include int main(){ int x[5] = { 2, 4, 6, 8, 10 }, *p, **pp; p = x, pp = &p; printf( "%d", *(p++) ); printf( "%3d", **pp ); return(0);}
A. 4 4
B. 2 4
C. 2 2
D. 4 6
下面程序段执行后的输出结果是( )。char *s = "abcde";s += 2;printf( "%d", s );
A. cde
B. 字符'c'
C. 字符'c'的地址
D. 不确定
下面程序段执行后的输出结果是( )。char a[] = "language", *p;p = a;while ( *p != 'u' ){printf( "%c", *p - 32 ); p++;}
A. LANGUAGE
B. language
C. LANG
D. langUAGE
下面程序执行后的输出结果是( )。#include char cchar( char ch ){ if ( ch >= 'A' && ch <= 'Z' ) ch = ch - 'A' + 'a'; return(ch);} int main(){ char s[] = "ABC+abc=defDEF", *p = s; while ( *p ) { *p = cchar( *p ); p++; } printf( "%s", s ); return(0);}
A. abc+ABC=DEFdef
B. abc+abc=defdef
C. abcaABCDEFdef
D. abcabcdefdef