Function pointer to the cast implementation code

  • 2020-04-02 01:53:24
  • OfStack

Nonsense is not much, straight on the code


#include <stdio.h>
#define abc
void syr(void)
{
 printf("hello world!n");
}
int main(int argc, char *argv[])
{
 void (*pFun)(void);
 printf("%dn",syr);
 pFun = (void(*)(void))(4199152);//Make sure the address is the same as the one printed above
 pFun();

 return 0;
}

Related articles: