#include <stdio.h>
#include <stdlib.h>

int (*math)(int a,int b);

int plus(int a,int b)
{
return (a+b);
}

int minus(int a,int b)
{
return (a-b);
}


int main(int argc, char *argv[])
{


math=plus;
printf("plus=%d\n",math(5,2));

math=minus;
printf("minus=%d\n",math(5,2));
system("PAUSE");
return 0;
}

 

 

  math  

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 matt 的頭像
    matt

    My的部落格

    matt 發表在 痞客邦 留言(0) 人氣()