As I was just reading the answer for some of these question in another thread I will give you 2 links that certainly will help you:
http://www.trials-shack.co.uk/posting.html
http://cboard.cprogramming.com/showthread.php?t=62210
As I was just reading the answer for some of these question in another thread I will give you 2 links that certainly will help you:
http://www.trials-shack.co.uk/posting.html
http://cboard.cprogramming.com/showthread.php?t=62210
That first link was informative. Not particularly relevant, but informative.Originally Posted by Maragato
I'd be careful with the second link. Those people are savages.Exorcism and bug spray usually work.Originally Posted by vijayalakshmi
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
The first link was a flash about how t ouse boards properly when I checked it it was online but now as you read they suspended the service but as it was in my cache I was able to see it sorry for the inconvenience of the useless link.Originally Posted by pianorain
Hmm, this is fun.
1. What is the output of printf("%d")
Who knows? (It gave me 48)
3. Difference between "C structure" and "C++ structure"
One is from C, the other from C++
17. Talk sometiming about profiling?
Ok. Profiling is good. You should try it. Really, no kidding.
36. Give 2 examples of a code optimization.
Faster code or smaller code, take yer pick.
Sure, you can get away with not type casting malloc.Originally Posted by pianorain
99) Can we give you more red squares than you have questions in your list?
Answer - I don't know, but we can sure try.
Quzah.
Hope is the first step on the road to disappointment.
>>11. What is Namespace?
Hmm... I wouldn't know since this is the C board and not the C++ board but I'm guessing that it's a space where you enter your name.
Continuing play?
>>27. What is the difference between "calloc" and "malloc"?
First begins with 'c', the second with 'm'. Good enough?
1. What is the output of printf("%d")
98
2. What will happen if I say delete this
If you delete it, it might be gone.
3. Difference between "C structure" and "C++ structure".
A "++"
4. Diffrence between a "assignment operator" and a "copy constructor"
Copy contructors are cheating.
5. What is the difference between "overloading" and "overridding"?
overloading is spelled correct, overriding is not.
6. Explain the need for "Virtual Destructor".
It sounds cool, so geeks need it.
7. Can we have "Virtual Constructors"?
No. Not again.
8. What are the different types of polymorphism?
It is said that some evil witches can turn people into frogs. So frogging is definetly one of them.
9. What are Virtual Functions? How to implement virtual functions in "C"
Virtual functions are slightly translucent versions of their normal cousins, the real function. You can only have virtual functions in C++. You can however cut little holes in your C functions so they seem translucent.
10. What are the different types of Storage classes?
I have bags and backpacks. Might be country specific.
11. What is Namespace?
If you fly to the moon, you are entitled to a specific moon name. Walks-On-Dust or Jumps-50-feet or something like that.
12. What are the types of STL containers?.
According to the first google link, STL is Stockwerk Ltd. They probably have a lot of different containers.
13. Difference between "vector" and "array"?
A vector has a sharp and piercing edge. An array is rather smooth.
14. How to write a program such that it will delete itself after exectution?
Use a compiler. In fact, most programmers do this for most programms.
15. Can we generate a C++ source code from the binary file?
Yes. We can even generate C++ source from blank files. Thats the power of C++. Just type away and suddenly you have a programm.
16. What are inline functions?
If you have a certain spacing in your file and all functions line up nicely in the text, the functions are "in line". If you make a mess, and the file looks ugly, programmers call this "out of line" functions.
17. Talk sometiming about profiling?
Police and FBI have profiler squads. I have heard that they sometimes even talk. Maybe you get lucky if you meet one.
18. How many lines of code you have written for a single program?
None for some, many for others.
19. What is "strstream" ?
It's a roleplayers term for a fountain of strength. A StrengthStream. Programmers tend to shorten stuff, so it's just a strstream for us leet dudes.
20. How to write Multithreaded applications using C++?
Ask a female member of your family for some thread she doesn't use anymore. Refer to #14 for writing applications
21. Explain "passing by value", "passing by pointer" and "passing by reference"
If you pass by value, you drive along a nice, rich family home. If you pass by pointer, someone stuck a sharp, pointy object into you ( probably a vector ) and you died. Passing by reference means you only heard that one of the above happened to someone else.
22. Write any small program that will compile in "C" but not in "C++"
50$/h. You can fax the money to my email address.
23. Have you heard of "mutable" keyword?
Yes.
24. What is a "RTTI"?
Arrrrrrrrrrrrrrrrtie is pirate slang for ATI, a well known graphic card manufacturer. If you buy two, you get a parrot for free.
25. Is there something that I can do in C and not in C++?
Yes.
26. Why preincrement operator is faster than postincrement?
Aerodynamics mostly.
27. What is the difference between "calloc" and "malloc"?
Their first character differs.
28. What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?
29. What is Memory Alignment?
Lawful evil.
( See AD&D Rulebook for more details on alignment. )
30. Explain working of printf.
It's working quite fine, thanks.
31. Difference between "printf" and "sprintf".
"s"
32. What is "map" in STL?
A container. See above for more info on Stockwerk Ltd.
33. When shall I use Multiple Inheritance?
When it pays to be the heir.
34. What are the techniques you use for debugging?
I give the bugreports to some poor QA assistent to verify. Then I take a day off to let someone else handle it while I'm away.
35. How to reduce a final size of executable?
Use a free zip tool.
36. Give 2 examples of a code optimization.
a) Make it faster
b) Make it smaller
hth
-nv
She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."
When in doubt, read the FAQ.
Then ask a smart question.
Nice one NV
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Originally Posted by nvoigt
So thats what I've been doing wrong, I tried making a program instead of letting the blank files do it for me. All that thinking for nothing!
Thanks NV I enjoyed a laugh at work.
Last edited by dpro; 02-24-2005 at 02:18 PM.
This can quickly turn to chaotic evil if pointers start running amuck.Originally Posted by nvoigt
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
Is that like the story about the room full of monkeys pecking away (more-or-less randomly) on computer terminals? We were hoping for Shakespeare, but all we got were Linux command lines.Originally Posted by nvoigt
Time, after time, after time.
Regards,
Dave
Oh, man; now I'm making wisecracks about wisecracks. Gotta stop this... But it's strangely addicting...
Last edited by Dave Evans; 02-24-2005 at 03:29 PM.
chaotic neutral > allOriginally Posted by pianorain
While I do not dispute that this is true, have you ever known a rampaging pointer that wasn't evil?Originally Posted by Thantos
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
Yes. On occasion it'll point to something useful and then right as you go to access it, it'll switch to something else. So it's both good and evil