Forums Assignment Help Are the outer parentheses in return statements really optional?

This topic contains 1 reply, has 1 voice, and was last updated by  Aakanksha 9 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1070

    Aakanksha
    Participant

    Are the outer parentheses in return statements really optional?

    #9634

    Aakanksha
    Participant

    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.)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.