65. Pointer-iii

Question.3

A command dispatcher uses a function pointer array of size 4 (indices 0–3):

int (*ops[4])(int,int) = {add, sub, mul, div_fn};
result = ops[cmd](a, b);

What happens if cmd = 5?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!