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

pointers are support in C#? if yes then how to use it?

8 Answers   Softvision Solution,


What is the difference between the c++ & java?

2 Answers  


Write A Program using Single and Multiple Inheritance.

1 Answers  


What is object in oops?

0 Answers  


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

0 Answers  






what is costructor?

1 Answers  


What is multiple inheritance? Give Example

6 Answers   Mind Tree,


Round up a Decimal number in c++.. example Note = 3.5 is as 4 3.3 is as 3

3 Answers   Accenture, Cognizant, IBM,


all about pointers

2 Answers  


what is oops

4 Answers   NIIT,


How is data security provided in Object Oriented languages? ?

5 Answers  


to remove the repeated numbers from the given . i.e.., if the input is 12233 output should of 123

2 Answers  


Categories