Hello there...!!
I am using a Borland Turbo C 3.0 compiler. I made a quiz programme that asks a GK question. The user is asked a question and given three chances to answer it correctly. For a correct first guess, you score 4 points. For a correct second guess, you score 2 points and for a correct third guess you score 1 point. No point is scored after third chance and the 'default' statement is executed which dispays the correct answer. Here is the programme:
GUESS.txt
The problem is that my programme bypasses all the 'switch/cases' and other 'if else' statements and directly jumps to the 'default' statement. I mean even if you type in the correct guess the first time, it always displays the default answer and awards no point.
Please help me with this. Also I wanted to ask whether 'scanf' takes up 'a string' as input or not and process it for operations such as printing, comparing the input against a value and like purposes......????
Thanks