Knowee
Questions
Features
Study Tools

What does the following C-statement declare?int ( * f) (int * ) ;a.A function that takes an integer pointer as argument and returns a function pointerb.A pointer to a function that takes an integer pointer as argument and returns an integer.c.A function that takes an integer pointer as argument and returns an integerd.A function that takes an integer as argument and returns an integer pointer

Question

What does the following C-statement declare?int ( * f) (int * ) ;a.A function that takes an integer pointer as argument and returns a function pointerb.A pointer to a function that takes an integer pointer as argument and returns an integer.c.A function that takes an integer pointer as argument and returns an integerd.A function that takes an integer as argument and returns an integer pointer

🧐 Not the exact question you are looking for?Go ask a question

Solution

The C-statement int (*f)(int *); declares a pointer to a function that takes an integer pointer as argument and returns an integer. So, the correct answer is b.

Similar Questions

What does the following program print?void f(int *p, int *q) { p = q; *p = 2;}int i = 0, j = 1;int main() { f(&i, &j); printf("%d %d \n", i, j); getchar(); return 0;}Options2 22 10 10 2

What does the following statement in C signify?

What is the output of the following C code:#include <stdio.h>void fun(int **p);int main(){ int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 8, 7, 8, 9, 0}; int *ptr; ptr = &a[0][0]; fun(&ptr); return 0;}void fun(int **p){ printf("%d\n", **p);}1234

Which of the following function declarations correctly accepts a pointer to an integer as an argument?Marks : 1Negative Marks : 0Answer herevoid func(int &x);void func(int *x);void func(int x);void func(int &*x);

Which of the following is a valid way to declare a pointer to a function in C?   *1 pointint (*func)(int, int);int *func(int, int);int func(int, int)*;int func(int, int);

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.