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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
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 is wrong with the programme??
#include<iostream.h>
template <class first>
class dd
{
	first i;
	public:
	 void set();
 void print();
};
  void dd< first>:: set()
		{
			cin>>i;
		}
 void dd< first>::print()
		{    
			cout<<"\n"<<i;
		}
void main()
{
	dd <char>g;
	g.set();
	g.print();
}
 Question Submitted By :: Ramu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: //what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }
Answer
# 1
template<class first> void dd<first>::set()
{
           cin>>i;
}

template<class first> void dd<first>::print()
{
           cout<<"\n"<<i;
}
 
Is This Answer Correct ?    0 Yes 0 No
Prakash
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
is java purely oop Language? Infosys22
You have one base class virtual function how will call that function from derived class?  4
difference between overloading and overridding  2
What do you mean by pure virtual functions?  4
Does c++ support multilevel and multiple inheritance? Wipro5
What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?  1
What is a template?  5
What is the difference between const int *ptr and int const *ptr???  2
What are the advantages of inheritance?  2
When a private constructer is being inherited from one class to another class and when the object is instantiated is the space reserved for this private variable in the memory?? Honeywell12
features of OOPS Ness-Technologies5
Tell me the scenario,Where we can use interfaces or Abstract class.And What is the difference between interfaces and abstract class?  3
Explain polymorphism? What r the types of polymorphism? pls give examples? HCL2
how to swap to variables without using thrid variable in java?  3
What is the outcome of the line of code "cout<<abs(- 16.5);"? 1) 16 2) 17 3) 16.5 TCS10
what is difference b/w object based and object oriented programming language? Infosys2
When is a memory allocated to a class?  3
What are the advantanges of modularity  2
What is function overloading and operator overloading?  2
what is meant by files? Infosys2
 
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