1.概念填空题
#include<stdio.h>
int main() {
int k, x;
for (k = 0, x = 0; k <= 9 && x != 10; k++) {
x += 2;
}
printf("%d,%d", k, x);
}
#include<stdio.h>
int main()
{
char c;
for (c = getchar(); getchar() != '#'; c = getchar())
putchar(c);
return 0;
}
2.单项选择
#include<stdio.h>
int main()
{
char ch;
for (; (ch = getchar()) != '\n';)
printf("%c", ch);
return;
}
3.阅读程序
#include<stdio.h>
int main()
{
int i;
for (i = 1; i < 6; i++)
{
if (i % 2)
printf("*");
else
printf("#");
}
return 0;
}