What happens if I cast a function pointer, changing the number of parameters
问题 I'm just beginning to wrap my head around function pointers in C. To understand how casting of function pointers works, I wrote the following program. It basically creates a function pointer to a function that takes one parameter, casts it to a function pointer with three parameters, and calls the function, supplying three parameters. I was curious what would happen: #include <stdio.h> int square(int val){ return val*val; } void printit(void* ptr){ int (*fptr)(int,int,int) = (int (*)(int,int