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 the difference between class and structure?

7 Answers  


What is the main purpose of inheritance law?

0 Answers  


What do you mean by variable?

0 Answers  


What is the difference between encapsulation and polymorphism?

0 Answers  


Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)

4 Answers  


write a programe to calculate the simple intrest and compund intrest using by function overlading

0 Answers  


What do we mean by a hidden argument in C++?

1 Answers  


is java purely oop Language?

49 Answers   HCL, Infosys, TCS,


Why is encapsulation used?

0 Answers  


What is and I oop mean?

0 Answers  


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

0 Answers  


What is the difference between inheritance and polymorphism?

0 Answers  


Categories