Re-learning C language--printf,scanf

Source: Internet
Author: User
printf (); Used to display the contents of a format string Note: Parameters cannot be wrapped, or a warning will be given.

More than the number of placeholders in the format string displays a value in a meaningless value format string where the placeholder is less than the number of expressions only displays the placeholder values conversion description format%m.px%-M.PXM: Minimum field width, minimum number of characters to display, number of characters to display less than M right (front empty  If the character to be displayed is greater than M, the actual width will be expanded automatically. The decimal point is also counted as one of the M. -Number: Is the left alignment accuracy (p): Several after the decimal point

scanf () Typical scarf usage: the conversion specifier is typically connected to the compiler and cannot check the parameters correctly. An expression is a pointer. Scant mode of work: pattern matching method, controlled by the format string, starting from the left to process the information of the string, for each of the conversion is read from the input and skip the space until you encounter the item does not belong to stop each read will skip the space the last carriage is not read to it as the next time s CANF calls the white space in the start format string Inode replaces 0 to a number of actual white space characters other characters match other characters

Re-learning C language--printf,scanf

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.