Thursday, July 30, 2009

C or C++ programing?

(a)


Writing a program that takes a decimal number input from the user and displays its binary number equivalent in 12 bits on the screen.





For example:


Enter a decimal number: 32


Its Binary Equivalent is : 000000100000





Hints


Conversion to base (2) is accomplished by successive divisions by 2. Make use of a loop for successive divisions.


Make use of %( modulus) and / (divide) operators (binary) to get the results.








(b)


Creating a program that declares an integer array with five elements. Now store in that integer array five different elements (10,20,30,40,50) using a pointer variable only.





Hints


The identifier of an array is equivalent to the address of its first element, as a pointer is equivalent to the address of the first element that it points to.





If A[5] is an array then the expressions A[2] and *(A+2) designate the same thing. Use (*A+2) to store the value in the third element of array.

C or C++ programing?
I'd do both in C, and do both by myself, rather than cheat on the assignment. The reason is that I would want to become a competent programmer who is really able to do things. Such programmers make good money, but companies aren't interested in paying people who can't do anything.
Reply:do your own homework
Reply:Tricky. I'm going with C++
Reply:you should first devid your number by ten (you can do it by a loop).and every digit you reached print it on the screen.





if you want the program i can write it for you.so mail me to send it for you as free.


C++ question?

I'm trying to create a class that acts basically just like an int, but has a much larger range. My plan is to take numbers in as strings to increase the range...for example, if the class is known as "LargeInt":





LargeInt x = 523473;





The numbers 523473 will be taken in as a string and stored as an array of chars as the numerical values. This way, I can manipulate the numbers by overloading the arithmetic operators, so that I can add, subtract, multiply and divide LargeInts.





I pretty much have an idea of how to overload the operators, however, I'm confused as to how to take the numbers in as strings. Any advice?

C++ question?
dude take just take the number in as a string





string s1 = "523473";








Then you have to use the string functions like


strlen(s1)





Then you'll have to do some kind of a for loop to add the two numbers.
Reply:Overload the default constructor to support a string parameter. And overload the assignment operator.





Edit: And take a look at http://gmplib.org/
Reply:Hi, there's no need to create that class from scratch. Try using the standard template library. The Standard template library of C++ does all these things for you so u don't have to reinvent the wheel, the downside? templates are quite hard to comprehend at 1st, but you'll get the hang of it. After some time, you'll be doing smart pointers, and so on...





By the way, what compiler are you using (VC++, Openwatcom, MingW, etc)?

local florist

When the trp operon is "on'...?

When the trp operon is "on'...


a)The repressor is bound to the promotor.


b)The repressor is bound to the operator.


c)The enzymes that build tryptophan are not made.


d)RNA polymerase can transcribe the structural genes in the operon.

When the trp operon is "on'...?
Dude. Is napoleon in your class? You should get together. The answer is still D.
Reply:D


A eukaryotic gene typically has all of the following features except...?

A. a promoter


B. an operator


C. enhancers


D. introns and exons


E. control elements

A eukaryotic gene typically has all of the following features except...?
B.. A typical eukaryotic gene contains the following:





Enhancer, promotor, TATA box, exon, intron, Distal enhancer.


My Medical Office Assistant course This is a study guide i am doing i will flunk without help.?

Veronica lives in a cold climate where ice, snow, and freezing temperatures are common during the winter


months. Unlike other employees, she never misses a day of work because of icy road conditions and


so on. Veronica is showing that she is


A. tactful. C. efficient.


B. cooperative. D. dependable.





When given a choice, most employers will often select office professionals who have


A. integrity. C. punctuality.


B. efficiency. D. charm.





If you have several calls coming in at one time, you should


A. handle one call at a time.


B. answer each call by placing the caller on hold.


C. answer each call as soon as possible, saying, “Good Morning, Mr. Smith’s office, will you hold,


please?”


D. ask someone else to help you.





To place a station-to-station international call, you would first press


A. “0” for the operator. C. the country code.


B. 011. D. the “#” button.

My Medical Office Assistant course This is a study guide i am doing i will flunk without help.?
1. D


2. B


3. C


4. B





i'm a tad bit iffy on the answers though seeing as how i'm also taking a medical office/clinical assistant class too


Please Help me .....?

To place a station-to-station international call, you would first press


A. “0” for the operator. C. the country code.


B. 011. D. the “#” button.





If it’s 10 A.M. Eastern standard time in New York City, what time is it in Los Angeles?


A. 12 P.M. C. 8 A.M.


B. 1 P.M. D. 7 A.M.


To keep a positive attitude on the job, you should


A. encourage others to help you with your work.


B. look for the good in people and things, not just the bad.


C. complain about the things that bother you so they can get straightened out.


D. look for the perfect company—this will ensure everything will be all right.





One way you can grow as an employee is to seek _______, which can be both positive and negative


information about your performance.


A. empathy C. feedback


B. cooperation D. initiative





Tony listens carefully to clients’ complaints and problems. He tries to put himself in their situation and


offers to help. Tony is displaying


A. tact. C. sincerity.


B. empathy. D. patience.

Please Help me .....?
the world is turning very fast I think....
Reply:Too many words, too little time..u figure ti out man..

floral deliveries

Damn bank account joke and others hope u like.?

A crusty looking old man walks into a bank and says to the teller at the window, "I want to open a damn checking account."


To which the astonished woman replies, "I beg your pardon, sir. I must have misunderstood you. What did you say?"


"Listen up, damn it. I said I want to open a damn checking account right now!"


"I'm very sorry sir, but we do not tolerate that kind of language in this bank."


With that the teller leaves the window and goes over to the bank manager to tell him about her situation. The both return and the manager asks the old geezer, "What seems to be the problem here?"


"There's no damn problem", the man says, "I just won 50 million bucks in the damn lottery and I want to open a damn checking account in this damn bank!"


"I see", says the manager, "and this ***** is giving you a hard time?"














Word Perfect Helpline





This is a apparently true story form the Word Perfect Helpline:-


Needless to say the helpdesk employee was fired; however, he/she is apparently suing the Word Perfect Organisation for :Termination without cause!!





(o=helpdesk operator; c=client)


o: Ridge Hall computer assistant, may I help you?


c: Yes, well, I’m having trouble with Wordperfect


o: What sort of trouble?


c: Well I was just typing along, and all of a sudden the words just went away.


o: Went away?


c: They disappeared.


o: Hmm, so what does your screen look like now?


c: Nothing


o: Nothing?


c: Its blank, and it won’t accept anything when I type.


o: Are you still in wordperfect or did you get out?


c: How do I tell


o: Can you see the C prompt on the screen?


c: What is a sea-prompt?


o: Never mind. Can you move the cursor around on the screen?


c: There isn’t any cursor, I told you, it won’t accept anything I type.


o: Does your monitor have a power indicator?


c: What is a monitor?


o: The thing with the screen on that looks like a TV. Does it have a little light that tells you when it’s on?


c: I don’t know


o: Well, look on the back of the monitor and find where the power cord goes into it, can you see that?


c: Yes I think so


o: Great. Follow the cord to the plug, and tell me if its plugged into the wall.


c: ..........Yes it is


o: When you were behind the monitor did you notice there were two cables plugged into the back of it, not just one?


c: No


o: Well, there are. I need you to look back there agaian and find the other cable


c: ..........Okay here it is


o: Follow it for me, and tell me if its plugged securely into the back of your computer.


c: I cant reach


o: Uh huh. Well can you see if it is?


c: No


o: Even if you maybe put your knee on something and lean way over?


c: Oh its not because I dont have the rihgt angle - its because its dark


o: Dark?


c: Yes - the office light is off, and the only light I have is coming in from the window


o: Well turn the office light on then


c: I can’t


o: No? Why not?


c: Because there is a power outage


o: A power ... A power outage? Aha, Okay, we’ve got it licked now.


Do you still have the boxes and manuals and packing stuff your computer came in?


c: Well, yes. I keep them in the closet


o: Good. Go get them, unplug your machine and pack it up just like it was when you got it. Then take it back to the store you got it from


c: Really, is it that bad


o: Yes, Im afraid it is


c: Well alright then, I suppose. What do I tell them?


o: Tell them you are too ****ing stupid to own a computer!!!!!!!!

Damn bank account joke and others hope u like.?
thanx so much u lightened up my day
Reply:That was a damn good joke !
Reply:lol
Reply:ROFLMFAO ROFLMFAO ROFLMFAO THAT IS THE FUNNIEST **** IVE READ IN ABOUT 3 YEARS ........................................... YOU GET A STAR
Reply:HAHA funny funny funny
Reply:Thanks so much for the morning laugh, I needed it!


:)