StoneColdCrazy
Programmer
1). int a = 50*20;<br>2). int b=50, c=20, a=c*b;<br><br>Will the compiled code in case 1 multiply 20*50 in order to get the number a, or will that operation be performed at compile time?? Same question about case 2??<br><br>NOTE: I using Borland C++, and the resulting code of case 1 from that compiler is, int a = 1000, (or something like that, except the code is in assembly), and the resulting code in case 2, is a = c*b... I just want to know, does all compilers do that, or some compilers will multipy the numbers at run time (even in 1st case)??