Post Reply 
C Evaluation
07-15-2022, 01:12 AM
Post: #4
RE: C Evaluation
Try Compiler Explorer, it support several languages, compilers and targets.
When you are not sure on how the C code get translated into assembly, Compiler Explorer will show you.

I am curious, what compilers did you used ?

I have tried several C compilers and they all gave me this output:
Code:
reached f1
reached f2
2

I have modified you main function to follow the standard
Code:
int main(int argc, char* argv[]) {
    short x;
    x = f1() * f2();
    printf("%d\n",x);
    return 0;
}
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
C Evaluation - toml_12953 - 07-14-2022, 08:06 PM
RE: C Evaluation - Craig Bladow - 07-14-2022, 08:34 PM
RE: C Evaluation - cruff - 07-14-2022, 11:44 PM
RE: C Evaluation - Sylvain Cote - 07-15-2022 01:12 AM
RE: C Evaluation - KeithB - 07-15-2022, 11:20 PM
RE: C Evaluation - ijabbott - 07-16-2022, 05:02 PM
RE: C Evaluation - robve - 07-16-2022, 06:43 PM



User(s) browsing this thread: 1 Guest(s)