Final answer:
When all variables are declared, 'return x;' and 'return x + 1;' are legal return statements in a function, while 'if' and 'else' need to be accompanied by return statements.
Step-by-step explanation:
Assuming that all variables are properly declared, statements in a value-returning function such as return x; and return x + 1; are certainly legal. These statements directly return a value, which is the purpose of a value-returning function in programming. However, the statements if (x % 2 == 0) and else are not stand-alone return statements but are part of conditional logic. They would need to be used in conjunction with return statements within their respective conditional blocks to be considered legal in the context of returning a value from a function.