Let\'s say I have a simple function like this:
int all_true(int* bools, int len) {
if (len < 1) return TRUE;
return *bools && all_true(boo
Your question is really "how smart is the compiler?" but you don't state which compiler you are using.
Given a hypothetical reasonable compiler which converts source code to an intermediary flow graph before optimizations, both fragments of code that you have written could be represented in the same way (the && operator, while convenient to type, is not nearly as trivially compiled as the & operator; so I wouldn't be surprised if it gets expanded out in one phase on a hypothetical compiler). On that assumption, it is reasonable to assert that the answer to your question is "yes".
However, if you're actually going to rely on this, you should just test it with whatever compiler you happen to be using.