I'd go for some of each type, they each test a different skill.
-what kind of errors we can introduce in our test codes like only syntactical,logical,or both..also out of many other possible errors.
Typos I can handle, but that looks like you're to lazy to even type out full words.
ow to make sure that after the code gets debugged it is
still is doing wh
at it was meant to do
done using sample input cases. B
to decide the input cases).
Well, if you want to give them what the out(?)put should look like, it's easy enough. Write a program, get your output, put in your errors.
Or else, just look at their final answer, see if it's a logical progression from the original. If you give them and they give you it looks pretty right to me. If instead they give you
that's wrong, and they get 0.
Which is shorter, which is faster, or just give them both the same mark.
-in case two ppl debug the code in same time how to decide which one has done it in a better way?
If you want to, it's your test. An example
-can we introduce optimisation issues and if yes how in real scenario.
It's a crappy example, but it should be easy enough to come up with something better.
if(x == 4 || x == 5)
if(x == 4) //something
if(x == 5) //something
if(x == 6) //something
if(x == 4 || x == 5 || x == 6) //something else
Some ideas might be sorting algorithms, prime number generation, whatever, maybe some variations so they just don't copy down something they remembered from elsewhere.
That would probably be the easiest way, it gives you a definate end-point, what the code should look like and do. Remember to go through all the questions though, see if you can end up with something else.
-how to frame questions.(taking an already existing codes and going in reverse way by introducing some errors or in some other better way..??)