指针函数

综合资讯时间:2022-08-09 09:22:56

指针函数

***回答

admin

树之空

回答于:2022-08-09

#include<stdio.h>
#include<stdlib.h> 
#include<string.h>
#define ERROR 0
#define OK 1


int add(int a,int b){
    return a+b;
}
int multiply(int a,int b){
    return a*b;
}

int main() {
    int (*fun)(int,int);
    fun=add;
    printf("%dn",fun(5,6));
    fun=multiply;
    fun(5,6);
    printf("%dn",fun(5,6));
    return 0;
}

其他问题

关于网站
树之空,一个聚集程序员工作开发的文章知识网站。你可以浏览到大量的软件编程开发文章,互联网新闻,IT行业资讯热点,编程开发,数据库服务器等知识。