以下程序运行后的输出结果是____,____。#include“stdio.h ”void swap(int *x,int *y){ int t;{ t=*x; *x=*y; *y=t;}printf("%d %d\n",*x,*y);}void main(){ int a[]={2,3};swap(&a[0],&a[1]);printf("%d %d\n", a[0],a[1]);}
查看答案
函数的返回值是一个指针型数据,即函数返回的数据不是具体的数值是地址。#include void main(){ int *fun(int *, int *);int a=2,b=4;int *p;p=____;printf("%f\n",*p);}int *fun(int *a, int *b){ if(*a<*b) ____;else return b;}
mystrcat函数实现的是字符串的连接操作。请填空。void mystrcat(char *str1,char *str2){ char *p=str1,*q=str2;while(*p)p++;while(____){ *p=*q ;p++;q++;}*p='\0';}
下列程序是计算一个4*4矩阵的对角线上所有元素乘以2的和。请填空。#includevoid main(){ int arr[4][4],i,j,sum=0;for(i=0;i<4;i++)for(j=0;j<4;j++)____;for(i=0;i<4;i++){ for(j=0;j<4;j++)if ( ____)sum+=arr[i][j]*2;}printf("对角线上元素乘以2之和:%d\n",sum);}
We see ___1___ as part of the way we do business and we also have a great partnership with our milk farmers in the UK. We use ___2___ in our chocolate, and there’s a co-operative of farmers who supply only milk that makes our UK chocolate. We’ve been working with them on their carbon footprint, so that’s the ___3___ that measures how much ___4___is produced from, to make milk.And we found in our Cadbury Dairy Milk bars that 60 per cent of the carbon footprint comes from milk. So, by working with this co-operative, we’ve begun to help them and help us make some changes in our ___5___. So that includes different types of animal feed, it includes investment, so that the ___6___ that brings the animal feed only delivers once rather than three times, and actually helping them really make some changes on their farms, so it’s more ___7___.So our partnership ___8___ not only for farmers in Ghana, but back into the UK and our dairy, dairy farmer partners in the UK as well.