day02

1
1111 0000 8位 一个字节(Byte)=8bit
一个float数据占用32bit,double数据占用64bit
2
浮点型在内存中的存储方式https://www.cnblogs.com/jillzhang/archive/2007/06/24/793901.html

3
在这里插入图片描述
4
C语言中各种数据类型中所占的字节和取值范围
https://blog.csdn.net/lianghui0811/article/details/48735885

5
excess elements in scalar initializer
过多的元素在变量的初始化中
binary executable 二进制可执行
script 的翻译:脚本
Arithmetic types and pointer types are collectively called scalar types. Array and structure types are collectively called aggregate types.
算术类型和指针类型统称为标量类型。 数组和结构类型统称为聚合类型。

6
sizeof(int )=4 得到的是字节数
sizeof与一维数组和二维数组
不论是一维数组,还是二维数组,如果直接
sizeof数组名,那么大小为整个数组所占用的内存空间,如果计算类似a+0,a+1等数组名进行了偏移运算,那么它就代表指向某个元素的指针,sizeof计算的话,其大小为指针的内存大小
https://blog.csdn.net/Y1730008223CONG/article/details/52937446
7
a作为右值,很多人估计也在学习的时候,估计会 把它作为 数组的地址,这是错误的!a作为右值时代表的意义和 &a[0]的意义是一样的,代表 数组首元素的首地址,而不是数组的地址。
注意:这里只是“当作”,并没有一个地方来存储这个地址。
8
char *strncpy(char *dest, const char *src, size_t n);
The strcpy() function copies the string pointed to by src, including the terminating(终止) null byte (’\0’), to the buffer(缓冲,缓冲器) pointed to by dest. The strings may not overlap(交叠), and the destination string dest must be large enough to receive the copy.

9结构体
//申明一个结构体
struct book
{
char title[MAXTITL];//一个字符串表示的titile 题目 ;
char author[MAXAUTL];//一个字符串表示的author作者 ;
float value;//一个浮点型表示的value价格;
};//注意分号不能少,这也相当于一条语句;
struct book library;//把library设为一个可以使用book结构体的结构体变量,则library这个变量就包含了其book结构体中的所有元素(struct book 相当于int a中的int数据类型,library为变量)

int *a强调的是该指针是指向int类型的变量
10
结构体的嵌套
https://blog.csdn.net/zw1996/article/details/53844585
struct date
{
int year;
int month;
int day;
};
struct student
{
char name[10];
struct date birthday;
}student1;
//若想引用student的出生年月日,可表示为;student.brithday.year;
brithday是student的成员;year是brithday的成员;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值