// Struct_Mp3.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<stdio.h> #include<stdlib.h> #define NUM 10 void fun(int a[],int n); void fun1(int a[],int n); int _tmain(int argc, _TCHAR* argv[]) { int array_t[NUM] = {1,2,3}; //打印原数组 for(int i =0 ; i < 3 ; i++) printf("%d ",array_t[i]); printf("/n"); //对数组进行操作 fun(array_t, NUM); //打印操作后数组 for(int i =0 ; i < 3 ; i++) printf("%d ",array_t[i]); printf("/n"); printf("/nPress any key to continue...."); getchar(); return 0; } void fun(int a[],int n) { //改变原数组值 printf("原 来 :a[0] = %d/n",a[0]); a[0] = 100; printf("改变后 :a[0] = %d/n",a[0]); printf("/n--------------division--------------/n"); printf("a[1] = %d ,address a[1] = %x/n",a[1],&a[1]); printf("a初始 = %d/n",a); a++; printf("a++后 = %d/n",a); printf("a[0] = %d ,address a[0] = %x/n",a[0],&a[0]); printf("/n--------------division--------------/n"); printf("sizeof(a) = %d/n",sizeof(a)); }