C Language notes 02

Source: Internet
Author: User

2. Basic programming knowledge


1) Relationship between CPU, memory, hard drive, graphics card, motherboard, and display


2) how to run the Hello World Program

Compile and unzip the chain to generate the. exefile. Execute the. exe file operating system)


3) What is the data type?

Basic type data

Integer: integer -- int-4 byte short integer -- short int-2 long integer -- longint-8

Floating Point: single precision -- float-4; double-8

Character: Single Character -- char-1

Composite data

Struct

Enumeration

Shared body


4) What is a variable?

Variable is equivalent to a container) the essence is a storage space in the memory.


5) Relationship between CPU, memory stick, VC ++ 6.0, and operating system


6) Why must variables be initialized?

Error & No initialization makes no sense


7) How to define variables?

Data type variable name = value to be assigned


8) What is hexadecimal?

B: Binary O: octal D: decimal H: hexadecimal

Printf (% d Indicates output in decimal format; % o indicates output in octal format % x or X indicates output in hexadecimal format)

Decimal binary division of two


9) How is a constant expressed in C?

Integer

Decimal: Traditional Writing Method

Hexadecimal: Add 0x or 0X to the front.

: Add 0 to the front

Floating Point Number

Float x = 3.2; // traditional

Scientific notation

Float x = 3.2e3; // The value of x is 3200

Float x = 123.45e-2; // The value of x is 1.2345.

Character

Enclose a single character in single quotes

String enclosed in double quotation marks


10) what binary code is a constant stored in a computer?

Integers are converted to binary data in the form of complement codes stored in computers.

The real number is converted to the binary data stored in the computer according to the IEEE754 standard.

The character is actually stored in the same way as an integer.


This article is from the "free as Freedom" blog, please be sure to keep this source http://ziyourufeng.blog.51cto.com/7940117/1304652

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.