ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  OOPS
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
What are generic functions and generic classes?
 Question Submitted By :: Tribhuvan Sharma
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What are generic functions and generic classes?
Answer
# 1
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 ?    1 Yes 0 No
Draku
 
  Re: What are generic functions and generic classes?
Answer
# 2
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 ?    1 Yes 0 No
Nikhil Kapoor..
 
 
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
suppose A is a base class and B is the derved class. Both have a method foo which is defined as a virtual method in the base class. You have a pointer of classs B and you typecast it to A. Now when you call pointer->foo, which method gets called? The next part of the question is, how does the compiler know which method to call? EA-Electronic-Arts2
What is the output of the following code: int v() { int m=0; return m++; } int main() { cout<<v(); } 1) 1 2) 0 3) Code cannot compile  3
What is abstraction?  6
how to swap to variables without using thrid variable in java?  3
What will happen when the following code is run: int x; while(x<100) { cout<<x; x++; } 1) The computer will output "0123...99" 2) The computer will output "0123...100" 3) The output is undefined  3
What is a linked list? IBM4
Base class has two public data members. How can i derive a new class with one datamember as public and another data member as private?.  2
Why do we use virtual functions?  3
What is Object and Class? What are the differences between them?  3
what is object slicing? Wipro4
Explain the concept of abstracion and encapsulation with one example. What is the difference between them? PCS2
When is a memory allocated to a class?  3
if u write a class do u write Assignment operator and copy constructor Siemens1
What is the difference between an object and a class?  2
How is data security provided in Object Oriented languages? ?  3
what is the use of mutable key word HCL2
What is polymorphism? Explain with an example.  7
what is virtual function in c++  4
what is the basic concept of inheritance?  3
what is the usage of clas templates  5
 
For more OOPS Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com