Why option C is the correct answer?

I verified my answer after the quiz by running the code in IDE and with every option it compiled successfully. So according to me the correct answer should be None of the above.

which question no are u talking about??

Q8. Sets STL quiz question

option c is giving error when i compile the code…
so option c is correct

I executed in Codechef Online IDE and it executes successfully

Please clarify.

getting compile time error even in codechef
please add some input to the set and then try to run the code

Yes it fails after I add some input to set, but as given in the question there was no input, if we talk about the code given in the question, that works fine. It only gives error when we add input to it, which was not mentioned in the question.

but then u just dont make a functionality if u dont pprovide input to it
i`ll convey ur concerns to the person in charge
but like its obvious to think of some input being sent

1 Like

i totally understand your point. Thanks :smiley:

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.