(C programming)
(Function arguments) Design a function prototype that can accept any type of argument and return an integer.
Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: (C programming)…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Expert Answer
function protorype format in c is as follows :
return_type function_name(argument list…..);
For the question asked … prototype is as follows: –
int func(double a);
Note that there is no templates in C , but you want it to be generic , then we can have this using C++ as follows: –
template<class T> int func1(T a) ;
here T can be any type and the function’s return type is int.