Answer: No. The formal syntax of a return statement is
return expression ;
But it's legal to put parentheses around any expression, of course, whether they're needed or not.
Showing posts with label Parentheses. Show all posts
Showing posts with label Parentheses. Show all posts
Thursday, April 9, 2009
Sunday, March 29, 2009
Are the parentheses in a return statement mandatory?
Answer: No. The formal syntax of a return statement is
return expression ;
But it's legal to put parentheses around any expression, of course, whether they're needed or not.
return expression ;
But it's legal to put parentheses around any expression, of course, whether they're needed or not.
Thursday, January 1, 2009
An expression contains relational, assignment and arithmetic operators. If Parenthesis are not present, the order will be
a. Assignment, arithmetic, relational
b. Relational, arithmetic, assignment
c. Assignment, relational, arithmetic
d. Arithmetic, relational, assignment
b. Relational, arithmetic, assignment
c. Assignment, relational, arithmetic
d. Arithmetic, relational, assignment
Subscribe to:
Posts (Atom)