zoukankan      html  css  js  c++  java
  • Conversion Specifiers and the Resulting Printed Output

    Conversion Specification

    Output

    %a

    Floating-point number, hexadecimal digits and p-notation (C99).

    %A

    Floating-point number, hexadecimal digits and P-notation (C99).

    %c

    Single character.

    %d

    Signed decimal integer.

    %e

    Floating-point number, e-notation.

    %E

    Floating-point number, e-notation.

    %f

    Floating-point number, decimal notation.

    %g

    Use %f or %e, depending on the value. The %e style is used if the exponent is less than –4 or greater than or equal to the precision.

    %G

    Use %f or %E, depending on the value. The %E style is used if the exponent is less than –4 or greater than or equal to the precision.

    %i

    Signed decimal integer (same as %d).

    %o

    Unsigned octal integer.

    %p

    A pointer.

    %s

    Character string.

    %u

    Unsigned decimal integer.

    %x

    Unsigned hexadecimal integer, using hex digits 0f.

    %X

    Unsigned hexadecimal integer, using hex digits 0F.

    %%

    Prints a percent sign.

  • 相关阅读:
    一些无意间YY的脑瘫题
    回滚莫队
    数论
    专题整理
    模拟赛x+1
    HISKrrr的板子库
    java多线程学习笔记(四)
    java多线程学习笔记(三)
    java多线程学习笔记(二)
    Java多线程学习笔记(一)
  • 原文地址:https://www.cnblogs.com/flyheart33/p/3570893.html
Copyright © 2011-2022 走看看