fun函数的功能是:通过键盘输入给x所指的整型数组所有元素赋值。在下列划线处应该填写的是( )。#include #define N 5Void fun(int x[N]){int m;For(m=N-1;m>0;m--) scanf(“%d”,____);}A.&x[++m] B.&x[m+1] C.x+(m++) D.x+m
有以下程序 #include <sthio.h> Main() {int s=0,n; For (n=0;n<3;n<0++) {switch(s) { case 0; Case 1;s+=1; Case 2;s+=2;break; Case 3;s+3; Case 4;s+=3 ; } printf((“%dn”,s); } } 程序运行后的结果是 A 1,2,4 。 B 1,3,6 。 C 3,10,14 。 D 3,6,10。
若有定义语句 int b=2; 则表达式(b<<2)/(3||b)的值是 4。 8。 0。 2。
有以下程序 #include <stdio.h>#include <stdlib.h>fun(int *p1,int *p2,int *s){ s=(int*)malloc(sizeof(int));*s=*p1+*p2;free(s);}void main(){ int a=1,b=40,*q=&a;fun(&a,&b,q);printf("%d",*q);}程序运行后的输出结果是 42。 0。 1。 41。
下列关于单目运算符++,— —的叙述中正确的是( )。