printf displays something weird

后端 未结 5 1337
刺人心
刺人心 2020-12-06 19:26

There is such code:

#include 

int main() {
  float d = 1.0;
  int i = 2;
  printf(\"%d %d\", d, i);
  getchar();
  return 0;
}
5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-06 19:56

    Is it signed or unsigned?

    Use this as a reference: http://www.lix.polytechnique.fr/~liberti/public/computing/prog/c/C/FUNCTIONS/format.html

提交回复
热议问题