C Language One day

Source: Internet
Author: User

What's the C language? c language = number + English.

A byte in a computer is a unit of measurement in which computer information technology is used to measure storage capacity and transmission capacity, and one byte equals a 8-bit binary number.

In the C language, int is an integer placeholder of 2 bytes or 4 bytes. (the output is represented as%d)

Float is a single-precision floating-point placeholder of 4 bytes. (the output is represented as%f).

Char is a byte placeholder for a character (represented as%c in the output).

The representation of a variable in the C language is represented by an alphanumeric and an underscore.

C Language Requirements: variables must be defined in use, not allowed to use one side of the definition, must be written at the front, or will error.

The simple C language output is as follows

int Main (void) {        int  a,b,c;        scanf ("%d%d%d",&a,&b,&c);        printf ("%d%d%d", A,b,c);            }

The logical operators of the C language include:&& (with, both of which are true binocular operators) | | (or, either side is true)! (for non-)

C-Language relational operators:, <, >=, <=.

In the output such as the following

int Main (void) {    int  A;     float b;    scanf ("%d%d%d",&a,&b,&c);    printf ("%d%3.2f", A, b);}

Where 3.2 is expressed as M.N where m means the entire floating-point type is three bits, n means that there are only two digits after the decimal point, if M<n then this number does not make any changes.
Number operator: +-* \

Relational operators:< > <= >=

Logical operator:&& | | !

Assignment operator: =

The above four precedence is the highest number operator and the assignment operator is the lowest.

1 int Main (void) {23     int  A; 4     float b; 5 6     scanf ("%d%d%d",&a,&b,&c); 7 8     printf ("%d%3.2d", A, b);

In this case, scanf means that the,& from the keyboard input is the address character.

Conditional statements

If condition statement: You can only control the first semicolon below, and if you have more than one semicolon, you need to add braces.

C Language One day

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.