Basic and Advance C Question:
Download Questions PDF

Are the outer parentheses in return statements really optional?

Answer:

Yes.
Long ago, in the early days of C, they were required, and just enough people learned C then, and wrote code which is still in circulation, that the notion that they might still be required is widespread.
(As it happens, parentheses are optional with the sizeof operator, too, under certain circumstances.)

Download C Programming Interview Questions And Answers PDF

Previous QuestionNext Question
Why dont C comments nest?Is there a way to have non-constant case labels (i.e. ranges or arbitrary expressions)?