[Study Notes] [C Language] data, Study Notes C Language

Source: Internet
Author: User

[Study Notes] [C Language] data, Study Notes C Language
1. What is data?

We are always dealing with data, such as weight data, blood pressure data, and stock price data. When we use computers, we will be exposed to a variety of data, including document data, image data, and video data, there are also text data generated during chatting on QQ, and file data downloaded by thunder.

2. Data Classification

Data stored in a computer can be divided into static data and dynamic data.

1> static data

Concept: static data refers to some permanent data, which is generally stored on hard disks. Hard disk storage space is generally relatively large, and now the hard disks of ordinary computers are about GB, so the hard disk can store some relatively large files.

Storage Duration: After the computer is turned off, the data is still on. As long as you do not actively delete the data or the hard disk is not broken, the data will always be there.

Static Data: static data is generally stored on hard disks as files, such as documents, photos, and videos.

2> dynamic data (temporary data)

Concept: Dynamic Data refers to the temporary data dynamically generated during the running of the program, which is generally stored in the memory. The memory storage space is usually relatively small. Currently, the memory of a general computer is only about 4 GB. Therefore, use the memory with caution and avoid occupying too much memory space.

Storage Duration: After the computer is disabled, the temporary data is cleared.

Dynamic Data: when a program (software) is run, the entire program is loaded into the memory, and various temporary data is generated during the program running, the temporary data is stored in the memory. When the program stops running or the computer is forced to shut down, all temporary data generated by the program will be cleared.

You may ask: Since the storage space on the hard disk is so large, why not load all applications into the hard disk for execution? The main reason is that the access speed of the memory is N times faster than that of the hard disk.

What data do programmers care about most?

3> conversion of static and dynamic data

Static> dynamic

Dynamic> static

3. Data size

1) Both static and dynamic data are composed of 0 and 1. How does 0 and 1 make up so much data?

2) If all data has size, static data will occupy the hard disk space, and dynamic data will occupy the memory space.

3) The larger the data, the more 0 and 1 contained, the bit and byte

4) 1 KB = 1024 B, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB

4. Data Types in C Language

Due to the wide variety of data in the app, C language data is classified to facilitate data operations.

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.