LogiQuest
Back to Typedef
5

What will be the output of the program?

#include <stdio.h>
typedef int (*Op)(int, int);
int add(int a, int b) { return a + b; }
int main(void) {
    Op f = add;
    printf("%d\n", f(2, 3));
    return 0;
}
Hard

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.