11 2018 档案
0是字符串的终止符
摘要:# include <stdio.h># include <string.h># include "myhead.h"#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) int main(void){ char name[] ="jason"; name 阅读全文
posted @ 2018-11-23 09:27 Peequeue 阅读(463) 评论(0) 推荐(0)
c语言中获取数组的长度写法
摘要:首先对于一维数组,如: char a[]={1,2,3,4};int b[]={1,2,3,4,5};float c[]={1.0,2.0,3.0};如何求取这些数组的长度呢?可以使用sizeof(),但由于sizeof()返回的是字节长度,所以可以使用sizeof(x)/sizeof((x)[0] 阅读全文
posted @ 2018-11-23 09:21 Peequeue 阅读(8008) 评论(0) 推荐(0)
c语言第一个程序
摘要:# include <stdio.h> int main(void){ printf(" 交换机后台管理 \n"); printf("1登录\n"); printf("2退出账号\n"); printf("3退出\n"); return 0;} 阅读全文
posted @ 2018-11-22 16:12 Peequeue 阅读(179) 评论(0) 推荐(0)