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++  >>  C++ General
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
How to stop conversions among objects?
 Question Submitted By :: Shalini
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to stop conversions among objects?
Answer
# 1
Declare operator function (dummy) for assignment operator 
in the private section of the class.
 
Is This Answer Correct ?    0 Yes 0 No
V.senthil Kumaran
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
int f() { int I = 12; int &r = I; r += r / 4; int *p = &r; *p += r; return I; } Referring to the sample code above, what is the return value of the function "f()"? a) 12 b) 15 c) 24 d) 17 e) 30 Quark2
Why preincrement operator is faster than postincrement?  3
Write the program for fibonacci in c++?  3
What is Virtual Inheritance? Wipro2
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Lucent3
class Foo { public: Foo(int i) { } }; class Bar : virtual Foo { public: Bar() { } }; Bar b; Referring to the above code, when the object 'b' is defined, a compiler error will occur. What action fixes the compiler error? a) Adding a virtual destructor to the class Bar b) Adding a constructor to Bar which takes an int parameter c) Adding "Foo()" to the Bar constructor d) Adding a copy constructor to the class Foo e) Adding "Foo(0)" to the Bar::Bar initializer list Quark1
Implement strcmp Citadel2
write the prime no program in c++?  4
What is problem with Runtime type identification?  1
class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members. Quark1
implement stack using stack.h headerfile functions Subex1
How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever Quark9
Which of the Standard C++ casts can be used to perform a ?safe? downcast: a) reinterpret_cast b) dynamic_cast c) static_cast d) const_cast Quark1
How would you stop a class from class from being derived or inherited?The constructer should not be Private,as object instantiation should be allowed.  14
Consider a c++ template funtion template<class T> T& Add(T a, T b){return a+b ;} if this function is called as T c = Add("SAM", "SUNG"); what will happen? What is the problem in the template declaration/ How to solve the problem. Samsung4
Difference between Overloading and Overriding? HP4
Disadvantages of c++  3
How do you know that your class needs a virtual destructor? Lucent3
What is a pure virtual function? Why is it represented as = 0...how is the internal implementation for the same CTS3
class basex { int x; public: void setx(int y) {x=y;} }; class derived : basex {}; What is the access level for the member function "setx" in the class "derived" above? a) private b) local c) global d) public e) protected Quark1
 
For more C++ General 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