Sunday, August 2, 2009

Write mystring class in C++?

1.write default constructor


2.write one argument constructor accepts the string


3.write copy constructor


4.overload assignment operator


5.overload + operator for string concatenation


6.find duplicat elements in a string


7.display the string without duplicate elements..that element should exist only once in the string








please this is challenging question in every interviews..neeed help sooon....





thanq in advance

Write mystring class in C++?
Well, here you go:





//Begin Code


#include %26lt;string.h%26gt;





class mystring{


public:


mystring(const char *);


mystring(mystring %26amp;); //Can't remember; is this a copy constructor?


~mystring();


mystring operator+(mystring %26amp;);


mystring RemDuplicates();


private:


char *string;


};





mystring::mystring(const char *str="")


{


string=new char[strlen(str)];


strcpy(string, str);


}





mystring::mystring(mystring %26amp;str)


{


string=new char[strlen(str.string)];


strcpy(string, str.string);


}





mystring::~mystring()


{


delete [] string;


}





mystring mystring::operator+(mystring %26amp;str)


{


return (mystring) strcat(string, str.string);


}





mystring mystring::RemDuplicates()


{


char defined[255];


int j, i;


for(j=0; j%26lt;strlen(string); j++)


if(defined[string[j]]){


for(i=j; i%26lt;strlen(string); i++)


string[i]=string[i+1];


string[strlen(string)-1]='\0';}


else


defined[string[j]]=1;


}


//End Code





I cannot guarantee its successful operation, but I can guarantee that it compiles OK.


How important are G.C.S.E's ?

This may sound like a really stupid question to some people but im in the middle of taken my GCSE's and i was wondering are GCSE's really that important and do they affect the chances of getting a good job.


People tell me that most of their job interviews, they never even asked for their GCSE's.

How important are G.C.S.E's ?
G.C.S.E's show that you are a particular level in a subject - although in a job interivew you may not be asked about them they will have looked at your C.V in whch you would have stated them.





A lot of jobs require Maths and English G.C.S.E as it shows you have a reached a particular level in Literacy and Numeracy.





Also, if you wish to carry on with your education they will determine the level of course you will be offered at a college or the subjects you can do for A levels.

hydrangea

C.i.a. test?

The CIA had an opening for an assassin.





After all the background checks, interviews and tests were done, there were 3 finalists... 2 men and a woman.





For the final test, the CIA agents took one of the men to a large metal


door and handed him a gun.





"We must know that you will follow your instructions, no matter what the circumstances. Inside this room, you will find your wife sitting in a chair. Kill her!"





The man said, "You can't be serious. I could never shoot my wife."





The agent said, "Then you're not the right man for this job.





Take your wife and go home"





The second man was given the same instructions.





He took the gun and went into the room.





All was quiet for about five minutes.





Then the man came out with tears in his eyes.





"I tried, but I can't kill my wife."





The agent said, "You don't have what it takes.





Take your wife and go home."





Finally, it was the woman's turn.





She was given the same instructions to kill her husband.





She took the gun and went into the room.





Shots were heard, one shot after another, eight in a row.





They heard screaming, crashing and banging on the walls.





After a few minutes, all was quiet.





The door opened slowly and there stood the woman.





She wiped the sweat from her brow.





"This gun is loaded with blanks," she said.





"I had to beat him to death with the chair."





Moral: Never put a woman to the test.

C.i.a. test?
Good one. I laughed so hard I farted just a little bit.
Reply:What exactly is your question?


By the way, that's an old joke...





: )
Reply:okie dokie.
Reply:Nice funny story, wrong moral.
Reply:don't ever marry a CIA agent
Reply:good stuff





id personally shoot the instructor
Reply:I agree, this scares me too.
Reply:that scares me
Reply:I can tell you the name of that woman...but then I'll have to kill you.
Reply:Ha Ha Ha Ha Ha!This is very funny,you deserve a star!
Reply:wow...
Reply:Agreed ^. It's sorta creeping me out.
Reply:Atta girl, my kind of joke.
Reply:they (CIA) actually use this test !!!!!!!!!!!


Any idea bout c, c++ and java qstns?

can u plz tell me wat kind of technical questions are asked in HR interviews???just...will it be very tough?

Any idea bout c, c++ and java qstns?
Are you interested in c, c++ and java qstns or in HR ones?


Because the HR questions are almost standard for a programmer profile...it doesn't matter if you'll develop in C++, java or any other languages!

hawthorn

The letter of application is intended to?

A.find out what the prospective employer has to offer


B.remind the prospective employer of your recent interview


C.outline your value to a prospective employer


D.accompany your portfolio

The letter of application is intended to?
c
Reply:Depending on your teacher or the interpretation of this question, the answer could be C or D. A letter of application literally implies that you are outlining your qualifications for a particular position and applying for the job at the same time. That would make the correct answer "C". If it is not truly a letter of application but a transmittal letter or cover letter, then it would state something to the effect: "In response to the job posting for research assistant (or whatever job you are applying for), I am enclosing my resume. My experience with computer applications and technology as well as my laboratory credentials would make me a valuable addition to your staff...." Something like that would actually be considered a cover letter instead of a "letter of application". So, if used in that way, D would be the correct answer. However, the use of "portfolio" is somewhat confusing. It implies that the subject is art or sales or other examples of your work. A resume outlines your skills, accomplishments and abilities and value and a true letter of application would be a resume.





How did your teacher teach the class? What was the context in which she used the phrase "Letter of Application"?





If it was truly a Letter of Application, accompanied by examples of your work (or a portfolio) then the letter would outline all your skills and accomplishments and qualifications for the job while the portfolio would validate your statements and/or give examples of your work.


The letter of application is intended to?

A. find out what the prospective employer has to offer.


B. remind the prospective employer of your recent interview.





C. outline your value to a prospective employer.





D. accompany your portfolio.

The letter of application is intended to?
C. You gain your prospective employer's attention and interest with the letter of application.
Reply:C. They have to know youre worth the interview! :-)


What's the biggest lie that came out of your mouth?

A. "I love you" (to your wife/husband, girlfriend/boyfriend)





B. "Good luck" (to your friend before taking a test or before a job interview)





C. Burp





D. Other





*if you chose D, what was it?

What's the biggest lie that came out of your mouth?
when breaking up....."it's not you ,it's me"........ making love....... "your're the best"..... one night stand........."this is unusual for me, I don't usually do this"..... bill collector........"I already mailed it,you should get it tomorrow or the next day"........girlfriend......"none of your friends looks anywhere as good as you,and I'm not attracted to any of your friends"....... "the dog".............
Reply:asker's rating comment----very funny-----touche' Report It

Reply:D. Of course I like you and not your best friend. hahaha (to ex boyfriend)
Reply:D, When I Said Ur Mom Was Hot.
Reply:d. I'm going to a church lock-in Mom





(I was actually going to Marti Gras)





The others I don't lie about- except Burp? huh?
Reply:D. I don't want to judge but...
Reply:a, b,c,d mom i was in church the whole time.of course i know the information i just forgot 2 tell u.





mom do u realy think i can lie to you?





i dont care if u sit next to her.





omg that looks so good on u(worst enemy) rolled eyes as soon as possible.





i cant decide between the 2 of u i mean i'm not going out with # 1 just cuz he's te most popular guy in school./ or cuz he has a car. hee-hee (girls and their lies.)
Reply:D. other


i when i was 17 i was walking down the street and smoking weed. i see these white dudes in this lil beater car starring at me. my first thought was it's about to go down. then they jump out the car while it was in motion. he was dressed in blue collared shirt that he had tucked in his blue jeans and a mag lite. Then i switched the thought of wippin some a$$ to oh **** the cops ! and turn around booked it! straight jetted on them( By the way i run the 100 in 11 flat and my 40 is 4.5 so i fly) i lost them and then cop car jumps out on me and points his gun and yell "STOP OR SHOOT YOUR A**" i said "got damn don't shoot me!" after that they couldn't arrest me cuz they didn't yell "stop the police" and they weren't in uniform. i had told them i thought they were racist tryin to start somethin ( its happened before)because that was my original thought except i wasn't going to run. lol( don't like racist) but when i seen how square they was about the whole situation i realized they were the POLICE and jetted. they believed me and told me not to smoke because I'm to fast for that. crazy!
Reply:D: I said, "Have a nice day" to my worst enemy. That also ties with the time I said, "Hi!" to my aunt, whom I dislike. I was more along the lines of "Go away and die," but of course I didn't say that.
Reply:D. This one.
Reply:My friend would say "I Do". hahahaha
Reply:D. it wasnt me, id never do such a thing!!
Reply:wrong catagory,,, edit
Reply:D. i Can't lie to you!
Reply:I HAD A MULTIPLE ORGASM
Reply:E. All the above.
Reply:D. No dear, those jeans do NOT make your butt look big.
Reply:D. Huh! What are you talking about Mom I didnt eat ALL of the muffins...





lol
Reply:D.) I think being gay is normal.
Reply:D. I didn't do it.
Reply:A but it was a long long time ago
Reply:D. No, i dont have a crush on your boyfriend!
Reply:d, nothng that big