This commit is contained in:
nonstriater
2014-05-18 21:02:31 +08:00
parent 98ed4336bc
commit 90bf14f6d3
6 changed files with 36 additions and 14 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ BinaryTreeNode *m_pLeft; // left child of node
BinaryTreeNode *m_pRight; // right child of node
};
1. 累加当前节点,
1. 累加当前节点,累加和大于给定值
2. 不为叶节点,左子树入栈
+7 -1
View File
@@ -8,4 +8,10 @@
scanf("%[^a]",dummy);
printf("%s\n",dummy);
return 0;
}
}
/**
输入一个串,以字符'a'结尾
*/
+12 -1
View File
@@ -4,7 +4,18 @@
int a=3, b = 5;
printf(&a["Ya!Hello! how is this? %s\n"], &b["junk/super"]);
//printf(3["helloworld \n"]);
printf("%c\n", 0["this"] );
printf(&a["WHAT%c%c%c %c%c %c !\n"], 1["this"],
2["beauty"],0["tool"],0["is"],3["sensitive"],4["CCCCCC"]);
return 0;
}
}
/*
*/
+4 -8
View File
@@ -3,17 +3,12 @@
#include <stdio.h>
int main()
{
char str[80];
scanf("%[^/n]",str);
printf("%s\n",str);
return 0;
char c;
scanf("%c",&c);
printf("%c\n",c);
scanf("%c",&c);
scanf(" %c",&c);
printf("%c\n",c);
return 0;
@@ -24,8 +19,9 @@
scanf("%c",&c) 和 scanf(" %c",&c) 区别
使用第二个scanf("%c",&c) 时,系统会将前一个scanf()输入的回车符号读入改变量。
这里为什么加一个“空格”就可以?
scanf带“空格”后,会从输入缓冲区中skip 空白符(空格、tab,换行符),读取一个字符
*/
+9
View File
@@ -0,0 +1,9 @@
int main()
{
char ch1;
char ch2;
ch1 = getchar();
ch2 = getchar();
printf("%d %d", ch1, ch2);
return 0;
}
+2 -3
View File
@@ -7,9 +7,8 @@
int main()
{
printf("%s\n",h(f(1,2)));
//printf("%s\n",g(f(1,2)));
printf("%s\n",h(f(1,2))); //
printf("%s\n",g(f(1,2))); // f(1,2)
return 0;
}