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++
 
  STL (65)  OOPS (264)  C++-General (277)
 


 

Back to Questions Page
 
Question
why overriding?
Rank Answer Posted By  
 Question Submitted By :: Prabhakant
I also faced this Question!!   © ALL Interview .com
Answer
same function name and same argument list
 
0
Kamal
 
 
Answer
In two classes(having parent child/common interface
relation) methods with same signature and execution of
method decided at run time based on object type.
 
0
Ejaz
 
 
Question
#define CUBE(x) (x*x*x)
main()
{ int a,b=3;
a=cube(b++);
printf("%d %d",a,b);
}
  What should be the value of a and b? My calc a=4 but syst 
a=6 how pls tell me if you know it?
Rank Answer Posted By  
 Question Submitted By :: B.sudharsan
This Interview Question Asked @   Wipro , No Company, No Company
I also faced this Question!!   © ALL Interview .com
Answer
surely 'a' cannot be 4 or 6.... it will be the value of b... since we are multiplying b++ thrice...... so surely 'a' cannot be 4 or 6.....

according to me  b=6 , and a=60......


thank u
 
1
Vignesh1988i
 
 
 
Answer
27 4 is the output.
 
the call to the macro sets a = b*b*b with b = 3, 3 cubed is 27
then b is incremented to 4 after the macro call
 
0
P. Smith
 
 
Question
given the code segment below
               void main()
               {
                 cout<<"my no. is";
               }
question is how can we get the output hai aravind my no. is
99999999999 without editig the main().
Rank Answer Posted By  
 Question Submitted By :: Aravind K R
I also faced this Question!!   © ALL Interview .com
Answer
#include <iostream>

using namespace std;

class dummy
{
public:
        dummy()
        {
                cout<<"Hai Arvind ";
        }

        ~dummy()
        {
                cout<<" 99999999999";
        }
};

dummy obj;

int main()
{
        cout<<"my no. is";
        return 0;
}
 
3
Pankaj Rathor
 
 
Answer
Overload the << operator.

ostream& operator << (ostream& ot, const char* chr)
{
   using std::operator<<;
   return ot << "Hai Arvind " << chr << " 99999999999";
}
 
3
Sunil Chopra
 
 
Question
What is the size of pointer ?
Also size of pointer in 64 bit pointer
Rank Answer Posted By  
 Question Submitted By :: V157162
I also faced this Question!!   © ALL Interview .com
Answer
Size of the pointer often corresponds to the architecture

Using a 32-bit OS gives you a 32bit pointer (ditto for 64 bit)
 
0
Kunal Mittal
 
 
Question
WHAT IS THE DIFFERENCE BETWEEN OBJECT BASED & OBJECT ORIENTD 
PROGRAMMING LANGUAGE.(GIVE AT LIST 4 PIONT)
Rank Answer Posted By  
 Question Submitted By :: Bicky143@gmail.com
This Interview Question Asked @   TCS , What Used For
I also faced this Question!!   © ALL Interview .com
Answer
the programming language which supports
inheritence,polymorpism,encapsulation is called o-o language.

the pgogrmming language which does not support inheritence
is called object based language.
 
0
Balu
 
 
 
Back to Questions Page
 
 
 
 
 
   
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