It seems there is huge difference between scanf & cin in accepting characters. In case of cin, it works as expected. But in case of scanf, instead of accepting the required character, it is accepting the new line character which got printed by previous printf statement. I checked this behaviour by running the program. Can someone please confirm if my program with printf/scanf fails because of this difference between cout/cin?
-- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/2a41eb03-346e-467e-b0f9-140856defb45%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
