#include //====================================================================== // Type definitions typedef struct { float real ; float imag; } complex_TypeDef; //====================================================================== // Funtions Prototypes void calc_function(complex_TypeDef*); //====================================================================== int main () { complex_TypeDef c1 = {1.2, 2.5}; printf("&c1 = 0x%lx \n",(long)&c1); printf("before calc_function : c1.real=%f c1.imag=%f \n",c1.real,c1.imag); calc_function(&c1); printf("after calc_function : c1.real=%f c1.imag=%f \n",c1.real,c1.imag); return 0; } //====================================================================== void calc_function(complex_TypeDef *param) { param -> real = param -> real + 1.0; // (*param).i = (*param).i + 1.0 ; param -> imag = param -> imag + 1.0; } //======================================================================