answersLogoWhite

0


Best Answer

// declare a function

int* function(int, int);

or

int* (function)(int, int);

// declare a pointer to a function

int* (*pointer_to_function)(int, int);

User Avatar

Wiki User

โˆ™ 2010-10-18 13:23:29
This answer is:
User Avatar
Study guides

What is a programming language

What does DOS stand for

What is a software that is distributed for free

What is application software

โžก๏ธ
See all cards
3.86
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
42 Reviews

Add your answer:

Earn +20 pts
Q: How do declare function pointer having two integer parameters and returning integer pointers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

Typedef the function signature then create an array of pointers of that type. char* func1() {/*...*/} char* func2() {/*...*/} char* func3() {/*...*/} typedef char* (*func_ptr)(); func_ptr func_array[3]; int main() { func_array[0] = &func1; func_array[1] = &func2; func_array[2] = &func3; /*...*/ return 0; }


How do you declare An array of three pointers to char?

char * p[3];


What does prototype mean in c plus plus?

A prototype in C++, as well as in C, is a declaration of a function and its parameters, including the types of the function and parameters. It does not actually create (define) the code for the function - it only identifies (declares) it to the compiler. It is used to enforce type checking for functions and parameters, and it is used to declare the function for use in other code prior to the function actually being defined, such as in a different compilation unit or library. Headers, for instance, contain mostly prototypes.


Can you declare a function in the body of another function in c language?

yes, we can not declare a function in the body of another function. but if we declare a function in the body of another function then we can call that very function only in that particular function in which it is declared; and that declared function is not known to other functions present in your programme. So if a function is required in almost all functions of your programme so you must declare it outside the main function i.e in the beginning of your programme.


Why you do not declare the function prototype?

Your question makes no sense.

Related questions

How do you declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

Typedef the function signature then create an array of pointers of that type. char* func1() {/*...*/} char* func2() {/*...*/} char* func3() {/*...*/} typedef char* (*func_ptr)(); func_ptr func_array[3]; int main() { func_array[0] = &func1; func_array[1] = &func2; func_array[2] = &func3; /*...*/ return 0; }


What is function parameters?

whatever the variables we declare in function signature to receive the arguments at the calling that are known as parameters.. e.g. int sum(int a,int b); here a & b are known as parameters.....


What are the various method to declare a function?

*Return variable type* *Function Name* (*Function parameters*) For example: int MyFunction (x,y)


What is default value of formal arguments?

In C, there is no default value for formal parameters. In C++, there can be, but the value is whatever you declare in the function declaration.


What is parameter in functions?

whatever the variables we declare in function signature to receive the arguments at the calling that are known as parameters.. e.g. int sum(int a,int b); here a & b are known as parameters.....


How do you declare An array of three pointers to chars?

char* my_array[3]; /* an array of three pointers to char */


What does prototype mean in c plus plus?

A prototype in C++, as well as in C, is a declaration of a function and its parameters, including the types of the function and parameters. It does not actually create (define) the code for the function - it only identifies (declares) it to the compiler. It is used to enforce type checking for functions and parameters, and it is used to declare the function for use in other code prior to the function actually being defined, such as in a different compilation unit or library. Headers, for instance, contain mostly prototypes.


How do you declare an array of five pointers to chars?

char *p="ragav"


How do you declare An array of three pointers to char?

char * p[3];


How many parameters can be passed to a function?

You can declare a function to accept an arbitrary number of arguments: int howManyParameters(int parameterCount, ...) { va_list ap; va_start(ap, parameterCount); printf("Function called with %d parameters:\n", parameterCount); for(int i = 0; i < parameterCount; i++) printf(" %d", va_arg(ap, int)); printf('\n'); return n; }


How will you declare an array of three function pointers where each function receives two ints and returns a float?

typedef float (*pt_func)(int, int); pt_func arr[3];another way:float (*pt_func[3])(int, int);


How will you declare an array of three function pointers where each function receives two int and returns float?

typedef float (*pt_func)(int, int); pt_func arr[3];another way:float (*pt_func[3])(int, int);

People also asked