What are generic functions and generic classes?

Answers were Sorted based on User's Feedback



What are generic functions and generic classes?..

Answer / draku

Generic functions are functions which are not used for any
particular datatype..they are useful for anydatatype Ex: if
you write code for the Sorting program using templates then
the function is useful for any data type to sort...Generic
classes are same as generic functions

Is This Answer Correct ?    41 Yes 5 No

What are generic functions and generic classes?..

Answer / nikhil kapoor..

Generic functions are the function which return void ptr...
(void*)...
Generic Classes are template classes...
Basicaly we implement both of them for reusability.. and
abstraction..

Is This Answer Correct ?    28 Yes 3 No

What are generic functions and generic classes?..

Answer / saranya.c

Generic functions are functions which are not used for any
particular datatype..they are useful for anydatatype Ex: if
you write code for the Sorting program using templates then
the function is useful for any data type to sort...Generic
classes are same as generic functions

Is This Answer Correct ?    9 Yes 6 No

What are generic functions and generic classes?..

Answer / lokesh singh

when ever we think about generic function, first of all
think why we needed.
if we want to use no of diffrent-diffrent variables in a
programme then we need no of function for that purpose.
generic function is used for preventing function
overloading. due to feature of taking any type of variable.
it have such type of quality.

Is This Answer Correct ?    8 Yes 5 No

What are generic functions and generic classes?..

Answer / sahadev

its happen in Tamplate. if a function receive any type of
argument than its called generic function.

Is This Answer Correct ?    7 Yes 6 No

Post New Answer

More OOPS Interview Questions

What is multiple inheritance? Give Example

6 Answers   Mind Tree,


What is meant by oops concept?

0 Answers  


what is the application of oops?

8 Answers   IBM,


What is function overloading?,describe it with the example.

5 Answers  


We have a scale and 7 balls. 1 ball is heavier than all the rest. How to determine the heaviest ball with only 3 possible weighing attempts?

8 Answers   IBM, Sage, Vertex,






what about you? wahat is your object? introduce your self?

1 Answers   Ajmal Perfumes, TCS,


what type of question are asked in thoughtworks pair programming round ?

0 Answers   Thought Works,


What is conditional Compilation?

3 Answers   emc2, HCL,


what is the advantage in software? what is the difference between the software developer and Engineer

1 Answers  


3. Differentiate verification and validation.

1 Answers  


What does it mean when someone says I oop?

0 Answers  


Can enum be null?

0 Answers  


Categories