Day0625_c basic knowledge of language

Source: Internet
Author: User
Tags binary to decimal

 1. Basic Knowledge  1. The basic data type occupies memory Char 1 bytes
Shot 2 int 4Float 4Double 8
Long 4 or 8 (32-bit operating system 4 bytes, 64 bits accounted for 8 bytes)  2. variable naming: Only numbers, letters, underscores, numbers cannot begin.  3. Some Xcode shortcut keys  command + z                     undo deleted things
Command + shift +4            
Command + r                     Run program COMMAND +/ Quick comment COMMAND + key to quickly let the cursor from the left side of the line to the right COMMAND + BACKSPACEDelete a row
Command + CTRL +Key aroundFast switching. hAnd. mFile
Command + SHIFT + NCreate a new public drive Command + comma                      Recall can be adjusted font size
Command +alt + curly braces              move code up or down command +b only compile not run results         4. expressions are valued, so as long as the value is an expression 5. statement is the smallest unit of program execution, ending with a semicolon 6. A semicolon is also an empty statement  7. Escape character\ \ print \ percent print %  8. The main function is the entrance to the program, and the program execution starts with the main function and ends with the main function.   input and output functions for 9.C languagesscanf("%d%c%d", &a,&b,&c); Precautions : 1. if the read-in data item type matches the format character, continue reading, otherwise, no longer view the remainder, return immediately 2. scanf ends with a big return 3. do not add \ n At the end of the scanf double quotation mark , whichwill offset the manual input        //4.2 Meaning, 4 is a total of several numbers (including decimal points), 2 means reserved Several decimals
printf("%4.2f", 1.12);   9.x binary to decimal: Sum by weightdecimal to X-binary: Even in addition to the rewind remainder      

Day0625_c basic knowledge of language

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.