上一页 1 ··· 147 148 149 150 151 152 153 154 155 ··· 186 下一页
摘要: 点击”视图“菜单--选择”浮动报告 窗口“ 阅读全文
posted @ 2021-04-08 16:30 myrj 阅读(437) 评论(0) 推荐(0)
摘要: %前有空格,%没有空格 scanf("%c",&c) 与 scanf(" %c",&c),后者只是在%前多了个空格,似乎没有什么区别,但使用起来区别是很大的。 scanf()作单字符输入时规定只接收一个字符,但它却把回车符也作为字符对待的。这个回车符是放在缓冲区的,但是空格却是直接忽略掉。 这就造成 阅读全文
posted @ 2021-04-08 15:27 myrj 阅读(267) 评论(0) 推荐(0)
摘要: FILE p和FILE *p大概可以这么理解:1 . 前一个p指文件型变量,后一个p指文件地址型变量。2 . 前一个p的内存地址已定,后一个p内存地址未定。 前一个是声明类对象,后一个是声明一个可指向类对象的指针一个是结构体,一个是指针 FILE是一个结构体,比较复杂,http://www.cnbl 阅读全文
posted @ 2021-04-08 14:26 myrj 阅读(833) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { printf("123\n"); printf("%c\n",'\177'); printf("\t\ta\n"); printf("abcde\b \b");//空格替换了e getchar(); } 阅读全文
posted @ 2021-04-07 07:51 myrj 阅读(210) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <limits.h> //整数限制 #include <float.h> //浮点数限制 void main() { printf("the FLOAT_MIN number is : %f\n",FLT_MIN); //float的最小值 p 阅读全文
posted @ 2021-04-06 18:08 myrj 阅读(4522) 评论(0) 推荐(0)
摘要: //#include<ctype.h> #include<stdio.h> #include <windows.h> //#include "string.h" //#include <locale.h> //#include "stdlib.h" //读TXT文件,模拟键盘输出,100个字符后清屏 阅读全文
posted @ 2021-04-05 21:41 myrj 阅读(608) 评论(0) 推荐(0)
摘要: 工具--编译选项--编译器 在连接器命令行加入以下命令 -static-libgcc -finput-charset=GBK -fexec-charset=GBK 有些处理汉字的程序运行正常,但EXE到另外电脑则出现乱码,一般是DOS窗口属性的原因,解决方法: A右击“命令提示符”窗口--属性 B选 阅读全文
posted @ 2021-04-05 20:33 myrj 阅读(321) 评论(0) 推荐(0)
摘要: #include <stdio.h> main() { char bla,blb,blc;//声明或定义三个字符型变量,变量名为bla,blb,blc //字符型数据用标识符char来标识定义,区分大小写 //字符型数据是用单引号括起来的一个字符 //字符型数据(常量)用英文单引号来限制,里面可以是 阅读全文
posted @ 2021-04-05 07:23 myrj 阅读(2160) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <locale.h> #include <wchar.h> int main() { setlocale(LC_ALL,"zh_CN.UTF-8"); wchar_t cn[256]; int inx,size; //输入中文汉字 //wpri 阅读全文
posted @ 2021-04-05 07:21 myrj 阅读(775) 评论(0) 推荐(0)
摘要: 字符型数据就是字符。 字符型数据的表示 字符型数据是用单引号括起来的一个字符。例如:'a'、'b'、'='、'+'、'?'都是合法字符型数据。在C语言中,字符型数据有以下特点: 字符型数据只能用单引号括起来,不能用双引号或其它括号。 字符型数据只能是单个字符,不能是字符串。 字符可以是字符集中任意字 阅读全文
posted @ 2021-04-05 06:46 myrj 阅读(3470) 评论(0) 推荐(0)
上一页 1 ··· 147 148 149 150 151 152 153 154 155 ··· 186 下一页