Basic summary of C language (i) Summary of----------functions and systems

Source: Internet
Author: User

1. Function classification 1) No parameter no return value function is generally used to perform certain fixed functions. (Print logo) 2) No parameter a return value function is generally used to get some data or results. (Get the number) 3) There are no return value functions that generally use parameters to accomplish certain functions.     (based on the incoming number to generate the star matrix) the transfer process of the real participation parameter, two parameters are irrelevant. 4) The function of the returned value is usually used to process the data and get the result of processing. (Data conversion, calculation and statistical consolidation data) 2. Recursive functions1) Recursion needs to be able to jump out only makes sense2) The keynote function is the function being tuned      Case:  1. Arithmetic progression      1 3 5 7 9...               2. Factorial      1 2 6 120...               3. Fibonacci Series      1 1 2 3 5 8 13...               4. Power functions      1 2 4 8 64...               5. Quick Sort 3. Conversion conversion       Converting between conversions is shown in the following table: 1010 1011 TD valign= "Top" width= "> TD valign= "Top" width= ">
decimal Octal hex binary   decimal octal hex binary
0 < Span lang= "en-us" xml:lang= "en-US" >00 0x0 0   8 010 0x8 1000
1 < Span lang= "en-us" xml:lang= "en-US" >01 0x1 1   9 011 0x9 1001
2 < Span lang= "en-us" xml:lang= "en-US" >02 0x2 Ten   10 012 0xa
3 < Span lang= "en-us" xml:lang= "en-US" >03 0x3   11 013 0xb
4 < Span lang= "en-us" xml:lang= "en-US" >04 0x4 +   12 014 0xc 1100
5 < Span lang= "en-us" xml:lang= "en-US" >05 0x5 101   13 015 0xd 1101
6 < Span lang= "en-us" xml:lang= "en-US" >06 0x6   14 016 0xe 1110
7 07 0x7 111 15 017 0xf 1111
4. Common conversion of the binary2: Divided by 2 to reverse the remainder method (decimal part multiplied by 2 rounding) 2-10: Right-click Expansion2-A:4 in 1 method. Integer part from right to left 4 is a group, fractional part from left to right 4 one Group, not enough to fill 0. Then each group is converted individually.2:1 Split 4 method. That is, each digit is split into 4 binary. 2-8: 3 -in-18-2:1 demolition 3 5. Original code anti-code and complement positive: anti-code= = Complement = = Original code Negative Number: The original code is the symbol+ BinaryReverse Code = = Original code In addition to symbol bit inversion complement = = anti-code + 1 6. Bit operation 1) AT &1 1 (Agreed) Convert a number to a 2 binary display 2) Bitwise OR | Same 0 get 0 (Brass Bell 3) bitwise XOR or ^ same as 0 different for 1 4) bitwise reverse ~ to = 0 5) shift left << leftn bits are like the N-Times multiplied by 2 6) Right shift >> right shiftn bits are like the n-th-squared divided by 2

Basic summary of C language (i) Summary of----------functions and systems

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.