1. Home
  2. Computer Science MCQs
  3. C Programming
  4. What does the declaration int (*f)(int); declare?

Added 30 Nov -0001

What does the declaration int (*f)(int); declare?

  1. A pointer to a function taking an int Correct answer
  2. A function that returns an int pointer
  3. An array of pointers to functions
  4. A pointer to an array of int values

Correct answer

A. A pointer to a function taking an int

12 views

MCQSEXAM

Explanation

The parentheses bind the asterisk to f, so it is a pointer to a function taking an int and returning an int.

Reference

Asked in: NTS, PPSC IT, Campus Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More C Programming MCQs

Practise all C Programming MCQs

Similar MCQs