"Part One" C + + primer scattered knowledge points

Source: Internet
Author: User

Some scattered, instant knowledge points to be dealt with.

The above section is the question, the following part is the answer

Some important concepts:

    • A type defines not only the contents of the data elements, but also the operations that can be performed on such data p3
    • C + + Each data item has its type P14
    • Every name in a C + + program must first be declared and then used P14
    • One of the first design focuses of C + + is the ability to define class types that use the same nature as built-in types p17
    • The program should try to avoid relying on the behavior of implementing the environment P33
    • An object is a memory space that has a certain data type p39
    • Initialization is not an assignment p39
    • Variables defined outside the body of any function are initialized to 0, and the built-in type variables defined inside the function body are not initialized, and the value of an uninitialized variable is undefined. It is recommended to initialize each variable of a built-in type. P40 "int i is true, but int *i is reversed, and compiler-related?" 】
    • The distinction between declarations and definitions is very important p41

Q:

    1. The definition of a function consists of several parts P3
    2. What is a built-in type P2
    3. What is the language of the data type for C + + P28
    4. Programming language is the two aspects to expand the basic features of the language p29
    5. The arithmetic type is divided into two classes P30 "What is the arithmetic type of the pointer"
    6. A byte is 8 bits, the word is 32 bit on the machine, a word of memory area is what form of p31
    7. If you want to use the same variable in multiple files, you must separate the declaration and definition, how do you do it p41
    8. The difference between int i = 071 and int i = 71

A:

    1. return value, function name, parameter list, function body
    2. Type of language itself definition
    3. static data type language
    4. The first is to give the programmer the right to customize the data type, and the other is to encapsulate some useful functions into a library function for the programmer
    5. Shaping (including characters and Boolean types) and floating-point type
    6. The former is 8 binary, the latter is the decimal
    7. The definition of a variable must appear and only appear in one file, while the other file used by the variable must be declared, but definitely not repeated.

"Part One" C + + primer scattered knowledge points

Related Article

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.