float to int unexpected behaviour

前端 未结 6 826
情话喂你
情话喂你 2020-11-30 16:05

can you please explain the o/p behavior of this program.

int main()
{
  float a = 12.5;
  printf(\"%d\\n\", a);
  printf(\"%d\\n\", *(int *)&a);
  return         


        
6条回答
提交回复
热议问题