题目内容

下列程序段的运行结果是()。char s[ ] ="language", *p =s;while(*p++ != 'u')printf("%c", *p - 'a' + 'A');

A. LANGUAGE
B. ANGU
C. LANGU
D. LANG

查看答案
更多问题

下列程序的运行结果是( )。int x, y, z;void p(int *x, int y){--*x;y++;z = *x+y;}int main(void){x = 5; y = 2; z = 0;p(&x, y): printf("%d,%d,%d#",x, y, z);p(&y, x): printf("%d,%d,%d",x, y, z);return 0;}

下列程序的功能是利用指针指向3个整型变量,并通过指针运算找出3个数中的最大值,输出到屏幕上。请填空。int main(void){int x, y, z,max, *px, *py, *pz, *pmax;scanf("%d%d%d", &x, &y, &z);px = &x; py = &y; pz = &z; pmax = max;();if(*pmax < *py) *pmax = *py;if(*pmax < *pz) *pmax = *pz;printf("max=%d\n", max);return 0;}

下面程序的输出结果是( )。int main(void){int a[ ] = { 2, 4, 6 }, *ptr = &a[0], x = 8, y, z;for(y = 0; y < 3; y++)z = (*(ptr + y) < x) ? * (ptr + y) : x;printf("%d\n", z);return 0;}

以下函数的功能是删除字符串中的所有数字字符。请填空。void dele(char *s){int n = 0, i;for( i = 0; s[i]; i++)if() s[n++] = s[i];s[n] = ();}

答案查题题库