目录
1、a、b 为传入参数,c 为传出参数
a、b 为传入参数,c 为传出参数
// a、b 为传入参数,c 为传出参数
void COperator(const int *a,const int *b,int *c)
{
*c = *a + *b;
return;
}
2、代码实例
#include <stdio.h>
#include <stdlib.h>
// a、b 为传入参数,c 为传出参数
void COperator(const int *a,const int *b,int *c)
{
*c = *a + *b;
return;
}
// c为传入参数
void Coperator_1(const int c)
{
printf("%d\n",c);
}
int main() {
printf("Hello, World!\n");
// 定义 a、b的值,并定义指针类型
int a = 12,b = 13,*c;
//分配堆空间
c = (int*)malloc(sizeof(int