What is the purpose of format specifier “%qd” in `printf()`?

后端 未结 3 1400
心在旅途
心在旅途 2021-02-18 17:24

I saw format specifier %qd when browsing github code. Then I checked in GCC compiler, it\'s working fine.

#include 

int main()
{  
          


        
3条回答
  •  耶瑟儿~
    2021-02-18 17:57

    One of most interesting C language related question to answer. The symbolic literal “%qd” represent as quad word, which is specified as used to handle 64 bits effectively with the printf function in the C programming language. Also just remember that, from 1999 edition of the C standard states that sizeof(long long) >= sizeof(long), and one can infer that the range of long long has a size of at least 64 bits.

提交回复
热议问题