[单选题]

现有如下程序段

#include "stdio.h"

int *fun(int *a,int *b)

{int c;

c=*a%*b;

return &c;}

main()

{int a=5,b=19,*c;

c=fun(&a,&b);

printf("%d\n",++*c);}

则程序段执行后的结果为

A.8

B.7

C.6

D.5

参考答案与解析:

相关试题

现有如下程序段#include"stdio.h"main(){int a[5][

[单选题]现有如下程序段 #include"stdio.h" main() { int a[5][6]={23,3,65,21,6,78,28,5,67,25,435,76,8,22,45,7,8,34,6,78,32,4,5,67,4,21, 1}; int i=0,j=5; printf("%d/n",*(&a[0][0]+2*i+j-2));} 则程序的输出结果为A.21B.78C.23D.28

  • 查看答案
  • 现有如下程序段 #include"stdio.h" intaa(intx,int

    [单选题]现有如下程序段#include "stdio.h"int aa(int x,int y);main(){int a=24,b=16,c;c=aa(a,b);printf("%d\n",c);}int aa(int x,int y){int w;while(y){w=x%y;x=y;y=w;}return x;}则程序段的输出结果是A.8B.7C.6D.5

  • 查看答案
  • 现有如下程序段#include"stdio.h"main(){int k[30]

    [单选题]现有如下程序段 #include"stdio.h" main() { int k[30]={12,324,45,6,768,98,21,34,453,456}; int count=0,i=0; while(k[i]) { if(k[i]%2==0‖k[i]%5==0)count++; i++; } printf("%d,%d/n",count,i);} 则程序段的输出结果为A.7,8B.8,8C.7,10D.8,10

  • 查看答案
  • 现有如下程序段#include"stdio.h"main(){int k[30]

    [单选题]现有如下程序段 #include"stdio.h" main() { int k[30]={12,324,45,6,768,98,21,34,453,456}; int count=0,i=0; while(k[i]) { if(k[i]%2==0||k[i]%5==0)count++; i++; } printf("%d,%d/n",count,i);} 则程序段的输出结果为A.7,8B.8,8C.7,10D.8,10

  • 查看答案
  • 有如下程序段#include "stdio.h"void fun(int *a,

    [单选题]有如下程序段#include "stdio.h"void fun(int *a,int *b,int *c,int *d,int *e){ int i,j,k,m; for(i=0;i< *a;i++) for(j=0;j< *b;j++)  for(k=0;k<*c;k++)  for(m=0;m< *d;m++)  ++*e;}main(){ int a=10,b=10,c=10,d=10,e=0; fun(&a,&b,&c,&

  • 查看答案
  • 有如下程序#include "stdio.h"fun(int a,int b){

    [单选题]有如下程序#include "stdio.h"fun(int a,int b){ int s; s=a*(b/4); printf("%d\n",s);}main(){ int a=16,b=10; fun(a,b);}该程序的输出结果是A.16 B.32C.40 D.80

  • 查看答案
  • 现有如下程序段 #include "stdio.h" main() { int

    [单选题]现有如下程序段#include "stdio.h"main(){ int k[30]={12,324,45,6,768,98,21,34,453,456};int count=0,i=0;while(k[i]){ if(k[i]%2==0||k[i]%5==0)count++;i++; }printf("%d,%d/n",count,i);}则程序段的输出结果为A.7,8B.8,8C.7,10D.8,10

  • 查看答案
  • 现有如下程序段 #include "stdio.h" main() { int

    [单选题]现有如下程序段#include "stdio.h"main(){ int k[30]={12,324,45,6,768,98,21,34,453,456};int count=0,i=0;while(k[i]){ if(k[i]%2==0||k[i]%5==0)count++;i++; }printf("%d,%d/n",count,i);}则程序段的输出结果为A.7,8B.8,8C.7,10D.8,10

  • 查看答案
  • 现有如下程序段 #include "stdio.h" main( ) { int

    [单选题]现有如下程序段#include "stdio.h"main( ){ int a[5][6]={23,3,65,21,6,78,28,5,67,25,435,76,8,22,45,7,8,34,6,78,32,4,5,67,4,21,1};int i=0,j=5;printf("%d/n",*(&a[0][0]+2*i+j-2));}则程序的输出结果为A.21B.78C.23D.28

  • 查看答案
  • 现有如下程序段 #include "stdio.h" main() { int

    [单选题]现有如下程序段#include "stdio.h"main(){ int a[5][6]={23,3,65,21,6,78,28,5,67,25,435,76,8,22,45,7,8,34,6,78,32,4,5,67,4,21,1};int i=0,j=5;printf("%d/n",*(&a[0][0]+2*i+j-2));}则程序的输出结果为A.21B.78C.23D.28

  • 查看答案
  • 现有如下程序段 #include"stdio.h" int*fun(int*a,