C variables and Data

Source: Internet
Author: User
Tags float double

%. 2f float double type % lf % E scientific notation

Scanf ("% F", & weight );

Float a = 3.13e-2;

Data Type keyword

Int long short

Unsigned

Char

Float double Long double

_ Bool

 

8-bit per byte

Int is stored in one word according to the number of digits in the computer. A word has 16 bits, 32 bits, and 64 bits (32 bits)

 

8-16 hexadecimal output

% O % x with prefix % # O % # x

Currently, long 64-bit long32-Bit Memory 16-bit int16-bit or 32-bit (depending on the machine's natural code)

16-32768 ~ 32768 unsigned 0-65535

32-2147483647 ~ 2147483647

64-bit is too big ......

Integer Overflow to start point

Print: Unsigned int % u long % LD % d (INT long has the same length) Short % H combination % uh

Int is the most convenient data type processed by the computer. Short is converted to int.

Char grade = 'a ';

C' character (letter, number, symbol) "" string % s

Sizeof () indicates the type size in bytes. sizeof (INT) = 4% u

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.