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 a null tree?

0 Answers  


I am developing a payroll system mini project.I used file concept in program for reading and writing.When the program is reloading into the memory that is if i execute next time the file was cleaned and adding data from the starting this is my problem.I want to strore the previous data and if i want to add any record that should be next of previous data.Please help me.

0 Answers  


What is virtual Function.

1 Answers   Wipro,


diff between Virtual mathod and abstract method?

1 Answers  


What is virtual destructor? Why?

3 Answers   Agile Software, College School Exams Tests, CSC,


what is mean by design pattern

4 Answers  


What is overriding vs overloading?

0 Answers  


what is difference b/w object based and object oriented programming language?

18 Answers   Chaitanya, College School Exams Tests, Educomp, IBM, Infosys, Telko,


What are the fields of vtable

1 Answers   Mphasis,


can you explain how to use JavaBean in Project

3 Answers   Infosys, Satyam,


Why a "operator=(...)" when there is a copy ctor?

2 Answers  


What is balance factor?

0 Answers  


Categories