+ 1

Write template function that returns the average of three number?(using oop) in C?

plz any one send me ths program today..

7th Jul 2017, 12:09 PM
Areeba Ahmed
Areeba Ahmed - avatar
2 Answers
0
Do you mean in C++? The C language doesn't support templates.
7th Jul 2017, 12:25 PM
Igor B
Igor B - avatar
0
template <typename T> T average(T t1, T t2, T t3) { return (t1 + t2 + t3) / 3; } It's cpp. C isn't OOP lang and doesn't support templates as already answered.
7th Jul 2017, 12:52 PM
soman