real life example

D

dost

plzz give me the answer of these question

1 Give exmples of virtual func and pure virtual func in real world
2 Give example of function overloading in real world
3 Write the structure of switch statement.
thanx
 
V

Victor Bazarov

dost said:
plzz give me the answer of these question

1 Give exmples of virtual func and pure virtual func in real world
2 Give example of function overloading in real world
3 Write the structure of switch statement.

These are not questions.
 
N

Noah Roberts

dost said:
plzz give me the answer of these question

1 Give exmples of virtual func and pure virtual func in real world

virtual int main() { return new int(0); }

pure virtual int main() { return virtual int(0); }
2 Give example of function overloading in real world

void function(int x) { cout << x; }

....
int y, b, q; char * x;

// overloading function call
function(y, b, q, x);
3 Write the structure of switch statement.

switch(test) {
case 1, 2, 34:
doX();
continue;
case 4, 5, 6:
doY();
continue;
case else:
doDefaultAction();
}

No problem. Make sure your friends get copies too.
 
R

red floyd

Noah said:
virtual int main() { return new int(0); }

pure virtual int main() { return virtual int(0); }


void function(int x) { cout << x; }

...
int y, b, q; char * x;

// overloading function call
function(y, b, q, x);


switch(test) {
case 1, 2, 34:
doX();
continue;
case 4, 5, 6:
doY();
continue;
case else:
doDefaultAction();
}


No problem. Make sure your friends get copies too.

Laughing my *ss off.
 
D

dost

actually this question may be stupid but it was asked me in
interview.........they do not need code....but the example......
thank you
 
P

Phlip

dost said:
actually this question may be stupid but it was asked me in
interview.........they do not need code....but the example......

Those questions are well below the minimum questions required to interview a
C++ candidate. Of course some interviewers can just start with such
questions, to prime the pump, but if you need to ask us about them then you
should consider learning more programming before trying to get a job doing
it.

Oh, and redfloyd was laughing because Noah was trying to get you in
trouble...
 
N

Noah Roberts

Phlip said:
Oh, and redfloyd was laughing because Noah was trying to get you in
trouble...

Don't listen to these guys. Those answers are correct and sure to
generate an optimum score on the assignment. These guys are just
trying to throw you off because it is normally bad form to answer
homework assignments here. You seemed like you had tried to do it on
your own enough to warrant actual answers instead of smart ass remarks.
Apparently these guys disagree.
 
P

Phlip

Noah said:
Don't listen to these guys. Those answers are correct and sure to
generate an optimum score on the assignment. These guys are just
trying to throw you off because it is normally bad form to answer
homework assignments here. You seemed like you had tried to do it on
your own enough to warrant actual answers instead of smart ass remarks.
Apparently these guys disagree.

It was a job interview, not an assignment, so your trap still won't work.

Nice try, though - and I'm sure we'll see it again some day... ;-)
 
S

Sgt. York

Phlip said:
It was a job interview, not an assignment, so your trap still won't work.

Nice try, though - and I'm sure we'll see it again some day... ;-)

And if he came here looking for answers, I suspect he won't be employed
as a c++ programmer anytime soon.
 
N

Noah Roberts

Sgt. York said:
And if he came here looking for answers, I suspect he won't be employed
as a c++ programmer anytime soon.

I don't know...I make an ass of myself all over the Internet all the
time and nobody has called me on it. Maybe searching usenet is a
dieing art...using it seems to be...
 
S

Sgt. York

Noah said:
I don't know...I make an ass of myself all over the Internet all the
time and nobody has called me on it. Maybe searching usenet is a
dieing art...using it seems to be...

Yeah, that sounded a bit like I was slamming the great talent that
frequents this newsgroup. I really meant to say he should know the
answers to those silly questions in his sleep before attempting
employment in the field.
 
D

dost

I dont need ur suggestion regarding my rivision....if u dont want to
answer just...do not reply....
and thanx 2 Noah Roberts
 
P

Phlip

dost said:
I dont need ur suggestion regarding my rivision....if u dont want to
answer just...do not reply....
and thanx 2 Noah Roberts

Dude, Noah did not answer your question. He wrote a bunch of lies to trick
you, so stop thanking him!

And don't write chat-style in forums that need more clarity, like this one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top