By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,795 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,795 IT Pros & Developers. It's quick & easy.

real life example

P: n/a
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

Jun 14 '06 #1
Share this Question
Share on Google+
14 Replies


P: n/a
dost wrote:
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.
Jun 14 '06 #2

P: n/a
dost wrote:
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


Plzz do your own homework:

http://parashift.com/c++-faq-lite/ho...t.html#faq-5.2

If you can't figure it out, I'm sure Google can help.

Cheers! --M

Jun 14 '06 #3

P: n/a

dost wrote:
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();
}
thanx


No problem. Make sure your friends get copies too.

Jun 14 '06 #4

P: n/a
Noah Roberts wrote:
dost wrote:
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();
}
thanx


No problem. Make sure your friends get copies too.


Laughing my *ss off.
Jun 14 '06 #5

P: n/a
actually this question may be stupid but it was asked me in
interview.........they do not need code....but the example......
thank you
red floyd wrote:
Noah Roberts wrote:
dost wrote:
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();
}
thanx


No problem. Make sure your friends get copies too.


Laughing my *ss off.


Jun 15 '06 #6

P: n/a
dost wrote:
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...

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Jun 15 '06 #7

P: n/a
dost wrote:
actually this question may be stupid but it was asked me in
interview.........they do not need code....but the example......


Please don't top-post. Putting your reply inline and/or below the post
you are responding to is customary here.

As for your interview questions, see this FAQ (particularly the
sentence after "shame on you"):

http://www.parashift.com/c++-faq-lit....html#faq-6.14

Cheers! --M

Jun 15 '06 #8

P: n/a

Phlip wrote:
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.

Jun 15 '06 #9

P: n/a
Noah Roberts wrote:
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... ;-)

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Jun 15 '06 #10

P: n/a
Phlip wrote:
Noah Roberts wrote:
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... ;-)


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

P: n/a

Sgt. York wrote:
Phlip wrote:
Noah Roberts wrote:
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... ;-)


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...

Jun 15 '06 #12

P: n/a
Noah Roberts wrote:
Sgt. York wrote:
Phlip wrote:
Noah Roberts wrote:

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... ;-)

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...


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.
Jun 15 '06 #13

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

Sgt. York wrote:
Noah Roberts wrote:
Sgt. York wrote:
Phlip wrote:
Noah Roberts wrote:

> 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... ;-)

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...


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.


Jun 15 '06 #14

P: n/a
dost wrote:
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.

--
Phlip
Jun 15 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.