What are generic functions and generic classes?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ambiguity in inheritance?

706


What is polymorphism and its types?

690


#include #include #include #include void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort

2163


What is for loop and its syntax?

679


Explain virtual inheritance?

780






What is property in oops?

667


What is class encapsulation?

708


Can we create object of interface?

697


What is abstraction in oops?

673


What is difference between polymorphism and inheritance?

703


Is react oop?

708


What is object and example?

702


What does and I oop mean in text?

731


What is the main feature of oop?

747


Why do we use polymorphism?

652