Home » C Programming » Pointers » Question
  1. What is the correct way to declare and assign a function pointer?
    (Assuming the function to be assigned is "int multi(int, int);")
    1. int *fn_ptr(int, int) = multi;
    2. int *fn_ptr(int, int) = &multi;
    3. int (*fn_ptr)(int, int) = multi;
    4. All of above
    5. None of these
Correct Option: C

int (*fn_ptr)(int, int) = multi;



Your comments will be displayed only after manual approval.