Concept behind these four lines of tricky C code

前端 未结 9 821
一向
一向 2020-12-22 14:40

Why does this code give the output C++Sucks? What is the concept behind it?

#include 

double m[] = {7709179928849219.0, 771};

i         


        
9条回答
  •  猫巷女王i
    2020-12-22 15:10

    The following code prints C++Suc;C, so the whole multiplication is only for the last two letters

    double m[] = {7709179928849219.0, 0};
    printf("%s\n", (char *)m);
    

提交回复
热议问题