[code=c]#include <stdio.h>
static int my_function(int a)
{
printf("my_func tion: %d\n", a);
return (2*a + 3);
}
int main(void)
{
int (*new_function) (int) = my_function;
int x;
x = (*new_function) (10);
printf("main: %d\n", x);
return 0;
}
[/code]
i couldnt compile the above program
wats the error
static int my_function(int a)
{
printf("my_func tion: %d\n", a);
return (2*a + 3);
}
int main(void)
{
int (*new_function) (int) = my_function;
int x;
x = (*new_function) (10);
printf("main: %d\n", x);
return 0;
}
[/code]
i couldnt compile the above program
wats the error
Comment