Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int Add(int a, int b){
- return a + b;
- }
- typedef int (*ptr)(int, int);
- void Print(char *name){
- printf("Hello\n");
- }
- struct functions{
- ptr print;
- };
- int
- main ()
- {
- int c;
- int (*p)(int, int);
- p = &Add;
- c = (*p)(2, 3);
- printf("%d", c);
- void (*ptr)();
- ptr = &Print;
- ptr("fdfdf");
- struct functions Functions;
- struct functions *func = &Functions;
- func = Functions.print(2, 3);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement