Summary of the seventh time assignment

Source: Internet
Author: User

Sixth chapter

This chapter summarizes the types of data that can be used in the C language as a review of the first five chapters.
Section 6.1 describes the integer, character, single and double precision by starting with the storage format of the data within the computer.
Definitions of four basic data types.
Section 6.2 describes the definition and use of different data type constants and variables
Section 6.3 Describes how to complete the input and output of data through function calls in the C language
Section 6.4 Describes the preprocessing automatic type conversion and forcing of different types of data blending operations in C language
Type conversions.
Section 6.5 describes the various expressions and operators of the C language that focus on the precedence of the various operators
Level and binding.

Seventh Chapter

1:1-D Arrays

the definition format of a one-dimensional array, data type array name [number of elements];

data type, int type, float type, char type.

An array name that represents the name of an array of data sets.

Subscript, with square brackets that is "[]" session set. Cannot use parentheses and braces, subscript value

Counting starting from 0.

The number of elements, the array contains the number of data. The number of elements must be greater than or equal to 1
An integer.

The array must be defined first and then used.

Example: int a[8] (subscript in square brackets) where this array element is: A[0]-...-a[7]

Two: arithmetic expression: monocular: +,-, + +,--。

Binocular: +,-,*,/,%.

Assignment expression: simple assignment: =

Compound assignment: +=,-=,*=,,/=%=,!=.

Relational expression: >,>=,<,<=,!=.

Logical expression:! , &&,| |

Conditional expression:?

Comma-expression:,

Other operations: sizeof,

Three: comma-expression:

Expression 1, expression 2, expression 3, .... Expression n

The expression 1 is evaluated first, then the expression 2, ... and use the value of the expression n as the value of the comma expression

Int A,b,c;

(a=2), (b=3), (C=A+B);

The comma operator has the lowest priority and the left combination.

Four: string array: Automatically add ' n-1 ' at the end of the input string and can only hold the length of a character.

The problems and experiences of the experience

This time the experiment is relatively complex, from the menu output job and using array to deal with the problem of Fibonacci sequence,

In the experiment encountered problems, with what to output, how to express.

With the lesson, content also slowly deepened, the class must listen carefully, the teacher in doing examples also must follow

Otherwise you do not know your problem where, hope you can keep up with the teacher's pace! Come on

Summary of the seventh time assignment

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.