%i or %d to print integer in C using printf()?

后端 未结 6 977
春和景丽
春和景丽 2020-12-08 02:08

I am just learning C and I have a little knowledge of Objective-C due to dabbling in iOS development, however, in Objective-C I was using NSLog(@\"%i\", x); to

6条回答
  •  北海茫月
    2020-12-08 02:59

    %d seems to be the norm for printing integers, I never figured out why, they behave identically.

提交回复
热议问题