摘要: ``` #include "stdio.h" int main() { int a; char b,c; scanf("%d",&a); c = getchar(); scanf("%c",&b); printf("%d\n%c\n", a,b); return 0; } //之所以需要第八行,是因为scanf("%d",&a); //执行程序时,你输入a,然后回车,实际上缓冲区... 阅读全文
posted @ 2015-11-13 13:52 樱风凛 阅读(1055) 评论(0) 推荐(0) 编辑
摘要: ``` #include int main() { //printf("Please input the value a:\n"); 等于下一句 fprintf(stdout, "Please input the value a:\n"); int a; //scanf("%d",&a); 等于下一句 fscanf(stdin,"%d",&a); if(a 0\n"); r... 阅读全文
posted @ 2015-11-13 13:41 樱风凛 阅读(169) 评论(0) 推荐(0) 编辑
摘要: : 代表启动程序时,命令行参数的个数。C和C++语言规定,可执行程序程序本身的文件名,也算是一个命令行参数,因此,argc的值至少是1. :指针数组,其中的每个元素都是一个char 类型的指针,该指针指向一个字符串,这个字符串里就存放着命令行参数。 例如,argv[0]指向的字符串就是第一... 阅读全文
posted @ 2015-11-13 13:31 樱风凛 阅读(1738) 评论(0) 推荐(1) 编辑