Square of a number being defined using #define

后端 未结 11 1204
说谎
说谎 2020-11-27 08:06

I was just going through certain code which are frequently asked in interviews. I came up with certain questions, if anyone can help me regarding this?

I am totally

11条回答
  •  悲哀的现实
    2020-11-27 08:33

    That's because the compiler replaces it with:

    i=4/4*4; 
    j=64/4*4;
    

    i = (4/4)*4 = 1*4 = 4.

    j = (64/4)*4 = 16*4 = 64.

提交回复
热议问题