Format characters and escape characters

Source: Internet
Author: User

The format characters commonly used in C language are as follows:

Format character Function
%o Output integers in unsigned eight- binary form
%x Output integers in unsigned 16- binary form
%u Output integers in unsigned 10 binary form
%d Outputs integers in signed 10 binary form (but positive numbers do not output a plus +)
%i Outputs integers in signed 10 binary form (but positive numbers do not output a plus +), old-fashioned notation, equals%d
%c Output one character
%s Output One or more characters
%f output single-, double-precision numbers in decimal form with 6-bit decimals by default
%e output single-and double-precision numbers in standard exponential form (i.e. scientific notation) , the number of fractional decimal digits default to 6 bits

The usual escape characters for C are as follows:

Escape character Function

Format characters and escape characters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.