i need some help regarding some questions of type :-
find the output of the given code.
find the errors in the given code/fragment
i want to know the tricks to solve these kind of questions
i need some help regarding some questions of type :-
find the output of the given code.
find the errors in the given code/fragment
i want to know the tricks to solve these kind of questions
Hmm, you pass them to a compiler and see!
Now besides joking, it's all about habit. If you haven't "burnt" yourself with these or similar errors before it'll be easier to miss them. I find myself saying "How could I have possibly miss that?!" but it still happens. It's like grammar, you have to know how it works and have already used it in order to spot mistakes in someone else's text.
About the output, you follow the flow of execution, like the PC would do. Flow charts are much easier to do this with, because their flow is pretty obvious. C++ code on the other hand can be a bit tricky if you aren't accustomed with it. I personally see the code as a flow chart directly, but you could be converting a line at a time for starters.
Devoted my life to programming...
i know all that but i need tricks to boost my skills in these types of questions!!! any suggestions???
NO UNIVERSAL SOLUTION then O K its fine i'll go with some tips(useful ones) any tips???
You want useful advice, you get useful advice:
1. Drink a lot.
2. Open the window regularly to get fresh air.
3. Stand up and move around every now and then.
4. Get an ocassional break to reset your mind.
What tricks could possibly exist? This is not magic, it's a skill, like skiing, cooking, or building tourist attraction models with LEGO bricks. The only trick ist practice, practice, practice. Gaining experience. Nothing to boost up there.
There are no tricks for these. There is only skill, which is obtained through practice.Originally Posted by Mukul Kumar
Back when I was a first year university student, I became known among my computing classmates for my uncanny ability to tell them what they did wrong without even looking at their code, just by a glance at the error message from their Java compiler. Magic? A trick? Hardly. I could do such wizardry because once upon a time, I made the same mistake and got the same compile error. That, coupled with my knowledge of the programming question that they were trying to solve, allowed me to diagnose their code's problem without actually reviewing it.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
O_o
Would it be inappropriate to create a second account just I could like that post again?
Soma
...and here's me doing programming day after day in my own time, trying to create/solve different problems, toiling away trying to get better, when all I actually need to do is follow this thread and wait for the 'tricks' to be revealed! Can't wait