2020年4月30日
摘要: 1 //for (i = 0; i < lim-1 && (c=getchar()) != '\n' && c != EOF; ++i) 2 // s[i] = c; 3 4 enum loop {NO, YES}; 5 enum loop okloop = YES; 6 i = 0; 7 whil 阅读全文
posted @ 2020-04-30 15:46 杪杪 阅读(247) 评论(0) 推荐(0)
  2020年4月28日
摘要: 1.打印标准头文件中的相应值 1 #include <stdio.h> 2 #include <limits.h> 3 main() 4 { 5 /* signed types */ 6 7 printf("signed char min = %d\n", SCHAR_MIN); 8 printf( 阅读全文
posted @ 2020-04-28 17:24 杪杪 阅读(506) 评论(0) 推荐(0)
  2020年4月26日
摘要: 1 #include <stdio.h> 2 3 int brace, brack, paren; 4 5 void in_quote(int c); 6 void in_comment(viod); 7 void search(int c); 8 9 /* rudimentary syntax c 阅读全文
posted @ 2020-04-26 15:28 杪杪 阅读(456) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #define MAXCOL 3 /* maximum colum of input*/ 3 #define TABINC 8 /* tab increment size*/ 4 5 char line[MAXCOL]; /* input line*/ 阅读全文
posted @ 2020-04-26 11:23 杪杪 阅读(317) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #define TABINC 8 3 4 main() 5 { 6 int c, nb, nt, pos; 7 nb = 0; 8 nt = 0; 9 for(pos = 1; (c = getchar()) != EOF; ++pos) 10 if(c 阅读全文
posted @ 2020-04-26 10:55 杪杪 阅读(330) 评论(1) 推荐(0)
  2020年4月25日
摘要: 1 main.c 2 #include <stdio.h> 3 4 #define TABINC 8 //定义每隔TABINC(8)个位置会出现一个制表位 5 6 int main() 7 { 8 int c, nb, pos; 9 10 nb = 0; //到遇到制表符时,到达下个制表位需要的空格 阅读全文
posted @ 2020-04-25 22:08 杪杪 阅读(263) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 3 #define MAXLINE 1000 4 5 int get_Line(char s[],int lim); 6 void reversestring(char s[]); 7 8 main() 9 { 10 char line[MAXLINE]; 阅读全文
posted @ 2020-04-25 17:20 杪杪 阅读(1078) 评论(0) 推荐(1)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 #define MAXLINE 1000 //允许输入行的最大长度 6 7 int get_Line(char line[], int maxline); 8 9 阅读全文
posted @ 2020-04-25 16:20 杪杪 阅读(354) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #define MAXLINE 1000 //允许输入行的最大长度 3 #define longerLine 80 4 int get_Line(char line[], int maxline); 5 6 7 main() 8 { 9 int len; 阅读全文
posted @ 2020-04-25 10:50 杪杪 阅读(437) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #define MAXLINE 1000 //允许输入行的最大长度 3 4 int get_Line(char line[], int maxline); 5 void copy(char to[], char from[]); 6 7 main() 8 阅读全文
posted @ 2020-04-25 10:11 杪杪 阅读(647) 评论(0) 推荐(0)