| 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  |
| 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.  |
| 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  |
| 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  |
| 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;
}  |
| Pankaj Rathor |
| |
| |
| Answer | Overload the << operator.
ostream& operator << (ostream& ot, const char* chr)
{
using std::operator<<;
return ot << "Hai Arvind " << chr << " 99999999999";
}  |
| 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)  |
| 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.  |
| Balu |
| |
| |
|
| |
|
Back to Questions Page |