int a[10]={6,7,8,9,是一个正确的语句吗?这是一个选择题,其中有一个答案是将5个初值依次赋给a[0]至a[4]
来源:学生作业帮助网 编辑:作业帮 时间:2024/09/10 20:21:00
x)+QH6461ױбy6c
Ovzvjy~O'L&\eC/yںɎtB$laP
m@ӎO<7ٚ/v?=31 EhX"}R]C Zl[vu6?߲ (s }OvMݼ(cg_\g w=
#include void main(){ int b=3;int a; int arr[]={6,7,8,9,10}; int *ptr=arr; *(ptr++)+=123;#include using namespace std;void main(){ int b=3;int a; int arr[]={6,7,8,9,10}; int *ptr=arr; *(ptr++)+=123; printf(%d,%d
,*(p
void fun(int a,int b) { int t; t=a;a=b;b=t; } main()void fun(int a,int b){ int t; t=a;a=b;b=t; } main() { int c[10]={1,2,3,4,5,6,7,8,9,0}.i; for(i=0;i
矩阵相加(C++)#include using namespace std; const int rows=3;const int cols=3;void matrixadd(int *,int *,int *,int,int);int main(){int a[rows][cols]={{1,3,5},{7,8,11},{13,15,17}};int b[rows][cols]={{9,8,7},{6,5,4},{3,2,1}};int c[rows][cols]={0
int[][]myarray=new int[][]{new int[]{1,2.3},}new int[]{4,5,6,7},new int{8,9,10,11,12},new int[]{-1.int[][]myarray=new int[][]{new int[]{1,2.3},}new int[]{4,5,6,7},new int[]{8,9,10,11,12},new int[]{-1.0}}; myarray[2][1]=______
#define N 20 fun(int a[],int n,int m) {int i; for(i=m;i>n;i--)a[i+1]=a[i]; return m; } void main() #define N 20fun(int a[],int n,int m){int i;for(i=m;i>n;i--)a[i+1]=a[i];return m;}void main(){ int i,a[N]={1,2,3,4,5,6,7,8,9,10};fun(a,0,N/2);for(i=0;i
int a[3][3]={{1,2,3},{4,5,6},{7,8,9}}; int **p; p=(int**)a; 其中p=(int**)a;是什么意思啊
#include void fun(int a, int b) { int t; t=a; a=b; b=t;main() { int c[10]={1,2,3,4,5,6,7,8,9,0), i; for (i=0; i
#include int b=2; int fun(int *k) {b=*k+b;return(b);} main() {int a[10]={1,2,3,4,5,6,7,8},
#include stdio.h void fun(int a,int b) { int t; t=a,a=b,b=t; } main() { int c[10]={1,2,3,4,5,6,7#include stdio.hvoid fun(int a,int b){int t;t=a,a=b,b=t;}main(){int c[10]={1,2,3,4,5,6,7,8,9,0},i;for(i=0;i
int a=2; int f(int a); {return (a)++;} main() {int s=0; {int a=5; s+=f(&&a);} s+=f(&&a); printf(%da=2;int f(int a);{return (a)++;}main(){int s=0;{int a=5;s+=f(&&a);}s+=f(&&a);printf(%d
,s);}执行的输出结果是()A 10 B 9 C 7 D 8
#include int b=2; int fun(int*k) { b=*k+b;return(b);} main() {int a[10]={1,2,3,4,5,6,7,8}#include int b=2; int fun(int*k) { b=*k+b;return(b);} main() {int a[10]={1,2,3,4,5,6,7,8},i;for(i=2;i
#define N 20 fun(int a[],int n,int m) { int i; for(i=m;i>=n;i--) a[i+1]=a[i]; return a[a+1]; } main#define N 20fun(int a[],int n,int m){ int i;for(i=m;i>=n;i--)a[i+1]=a[i];return a[a+1];}main(){int i,a[N]={1,2,3,4,5,6,7,8,9,10};fun(a,2,9);for(i=0;i
应用函数、数组、指针求数组中的最大值、最小值、平均值. 我作出了一个但是总是出错?#includeint max(int *p);int min(int *q);double averrage(int *n);void main(){ int a[10]={1,2,3,4,5,6,7,8,9,10}; int k,z; double s;
下列程序的输出结果是#define N 20void fun (int a[ ],int n,int m){int i,j;for (i=m;i>n;i--)a[i+1]=a[i];}main(){int i,a[N]={1,2,3,4,5,6,7,8,9,10};fun(a,2,9);for(i=0;i
int a[ ][3]={1,2,3,4,5,6,7,8,9,10,11,12};int*p=a;求 *(*(a+2)+2)的含义(或值
#include void InSertSort(int R[],int n);特别这一行void main(){int arr[]={0,1,2,3,4,5,6,7,8,9};int n=9;InSertSort(arr,10);}void InSertSort(int R[],int n)特别这一行{int i,j;int temp;for(i=1;i=0&&temp
1.已有定义 int a[10],*p; 则正确的赋值语句是( ).A.p=100; B.p=a[5]; C.p=a[2]+2; D.p=a+2;2.若有定义int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a; 则不能表示a数组元素的表达式是 ( )A.*p B.a[1] C.*a D.a[10]3.设有定义int x[6]=
1.已有定义 int a[10],*p; 则正确的赋值语句是( ).A.p=100; B.p=a[5]; C.p=a[2]+2; D.p=a+2;2.若有定义int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a; 则不能表示a数组元素的表达式是 ( )A.*p B.a[1] C.*a D.a[10]3.设有定义int x[6]=