代码如下所示:
实现代码如下:

#include <stdio.h>
int *add(int a,int b)
{
    int c = 0;     //原题没有这行
    int *p = NULL;
    p = &c;        //原题没有这行
    *p = a+b;
    return p;
}
int main(void)
{
    printf("%d/n",*add(2,3));
    return 0;
}

以上就是【解析如何用指针实现整型数据的加法】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)

与本文相关的软件

发表我的评论

最新评论

  1. 暂无评论