Let us learn C in Code <4> _data type
来源:互联网 发布:电脑什么拍照软件 编辑:程序博客网 时间:2024/06/05 05:55
We have declared two types of data , the integer and float, but actually C language supports three data types.
0) As integer(int) and float(float) are belong to the fundamental data type. Except for the integer(int) and float(float) ,there are character(char),double precision floating point(double). As the table below shows the basic data types.
----------
int
char
float
double
----------
1)Derived data types,these type is combined with other keywords like signed, unsigned, short,long etc. The derived data types expends the data types ,and the variable is declared can hold difference numbers.Before list these derived data types, we should know Machine type, as actually , my pc belongs to 32-bit type machine.Do you get it?Our computer just know binary and only know the binary , all the information store in computer are binary, and each bit can but only can hold one of the two opponent signals ,0 and 1. Which really looks like our human society , man or woman , girl or boy, yes or no, speak or shut up. 32-bit can hold how many status, this maybe a mathematical problem, actually 32 powers of 2. Now let us look at the derived data types, they are as follows:
signed char
unsigned char
signed int
unsigned int
short int
signed short int
unsigned short int
signed long int
unsigned long int
There maybe more than these types, but it really dosen't matter ,all our chapters goes on , we will learn all of them in code gradually.
2)User defined data types, these types related with the structure and declaration keyword is struct, but as the newer to the C language, these user defined data types will be introduced to you lately. Here , you and me just need to know that. This data types existence ,more than that these types are surely important. As some software engineers said "Program are the data structure and algorithms!".
Before finish this article , that solve a problem , please write an program to caculate the result, equation like this " y = x^2 + 2x + 1 ", each time you enter a number then y is the result, any data type is ok.
Time limited , have a nice day everyone!
- Let us learn C in Code <4> _data type
- Let us learn C in Code <0>
- Let us learn C in Code <1>
- Let us learn C in Code <2>
- Let us learn C in Code <10>
- Let us learn C in Code <3>_constant
- Let us learn C in Code <5>_printf()_function
- Let us learn C in Code <6> _printf()
- Let us learn C in Code <7> operators
- Let us learn C in Code <8> decision making
- Let us learn C in Code <9> pseudocode
- Let us learn C in Code <10> flowchart
- Let us learn C in Code <11> flowchart while
- Writing endian-independent code in C(Don't let endianness "byte" you)
- API WritePrinter Let us entd1
- objective-c语言_data的转换
- Learn in FCC(4)
- US zip code
- 如何成为一个优秀的系统架构师
- JS的最爽
- pycharm+django之小试牛刀
- 算法训练 寻找数组中最大值
- 蓝桥杯:带分数
- Let us learn C in Code <4> _data type
- JS好不好
- PAT1054
- nohup及重定向
- [LeetCode] [动态规划] Word Break
- UVa:1554 Binary Search
- UVa 10009 - All Roads Lead Where?
- traceroute原理
- 亲测UISearchBar Delegate的11个方法和UISearchDisplay Delegate的12个方法的调用顺序