2021 Fundamentals of C Programming(Northwestern Polytechnical University) 最新满分章节测试答案
- Chapter 1 Introducing C-2 Quiz 1 Introducing C
- Chapter 2 Data Types and Expression -2 Quiz 2 DataType, Variable and Constant
- Chapter 2 Data Types and Expression -3 Quzi 3 Operators and Expression
- Chapter 3 program control structure -2 Quiz 4 Formatted Input & Output
- Chapter 3 program control structure -4 Quiz 5 Selection Structure
- Chapter 3 program control structure -5 Quiz 6 Loop Structure
- Chapter 4 The Preprocessor Quiz 7 Preprocessor
- define Y(n) ((N+1)n), which one of the following is the value of the expression 2(N+Y(5+1))?
本答案对应课程为:点我自动跳转查看
本课程起止时间为:2021-02-28到2021-06-28
Chapter 1 Introducing C-2 Quiz 1 Introducing C
1、 问题:When compile a C program, the comments will .
选项:
A:be compiled and appear in the object code.
B:be compiled, but not appear in the object code.
C:not be compiled and not appear in the object code.
D:not be compiled, but appear in the object code
答案: 【not be compiled and not appear in the object code.】
2、 问题:A file written by C language .
选项:
A:can be executed immediately.
B:is a source program.
C:can be executed after compilation.
D:can be executed after compilation and interpretation.
答案: 【can be executed after compilation.】
3、 问题:Many programming languages borrow heavily form C language, including C++, C# .
选项:
A:正确
B:错误
答案: 【正确】
4、 问题:One of C’s advantages is efficiency. Because C was intended for applications where assembly language had traditionally been used, it was crucial that C programs could run quickly and in limited amounts of memory.
选项:
A:正确
B:错误
答案: 【正确】
5、 问题:C’s weaknesses arise from the same source as many of its strengths: C’s closeness to the machine.
选项:
A:正确
B:错误
答案: 【正确】
Chapter 2 Data Types and Expression -2 Quiz 2 DataType, Variable and Constant
1、 问题:Which of the following is a legal C identifier?
选项:
A:1stuNPU
B:Stu@NPU
C:stu-NPU
D:_stu_NPU
答案: 【_stu_NPU】
2、 问题:Which of the following is not keyword in C language?
选项:
A:do
B:int
C:void
D:main
答案: 【main】
3、 问题:Which of the following is NOT a constant in C language?
选项:
A:012
B:"a"
C:”
D:’AB’
答案: 【‘AB’】
4、 问题:Which of the following is NOT a float constant in C language?
选项:
A:2.38
B:.23
C:1.2e-2
D:e-2
答案: 【e-2】
5、 问题:The three identifiers, weight, Weight and WEIGHT, are NOT equal in C language.
选项:
A:正确
B:错误
答案: 【正确】
Chapter 2 Data Types and Expression -3 Quzi 3 Operators and Expression
1、 问题: In C language, which of the following operator requires its operands must be of type int?
选项:
A:/
B:*
C:=
D:%
答案: 【%】
2、 问题: Of which operation the precedence is higher than others’?
选项:
A:+
B:%
C:*
D:()
答案: 【()】
3、 问题: The value of the expression 3.6-5/2+1.2+5%2 is ____.
选项:
A:4.3
B:4.8
C:3.3
D:3.8
答案: 【3.8】
4、 问题:Suppose all variables in the following expressions have been declared and initialized, which of the following is NOT a legal expression in C language?
选项:
A:a = (2, b= c + 2)
B:(int)18.5%3
C:a = b += c + b
D: a := b + 1
答案: 【 a := b + 1】
5、 问题:If an expression is the sum of four data of different types, including int, long, double and char, the expression’s type is ____.
选项:
A: int
B: long
C:char
D:double
答案: 【double】
6、 问题:The expressions ++i and i++ are exactly NOT the same as (i += 1).
选项:
A:正确
B:错误
答案: 【正确】
Chapter 3 program control structure -2 Quiz 4 Formatted Input & Output
1、 问题: If c is a variable of type char, which one of the following statements is illegal?
选项:
A:i += c; /i has type int/
B:c = 2*c – 1;
C:putchar(c);
D: printf(c);
答案: 【 printf(c);】
2、 问题:Suppose that we call scanf as follows:scanf(“%d%f%d”, &i, &x, &j);If the user enters:10.8 9 3↙What will be the values of i, x, and j after the call? (Assume that i and j are int variables and x is a float variable. ↙ is used to represent Enter key)
选项:
A:10 9 3
B:11 9 3
C:10.8 9 3
D:10 0.8 9
答案: 【10 0.8 9】
3、 问题:Suppose that we call scanf as follows:scanf(“%f%d%f”, &x, &i, &y);If the user enters:12.3 45.6 789What will be the values of x, i, and y after the call? (Assume that x and y are float variables and i is an int variable. ↙ is used to represent Enter key)
选项:
A:12.3 45 789
B:12.3 45.6 789
C:12 45 789
D:12.3 45 0.6
答案: 【12.3 45 0.6】
4、 问题:Which one of the following is correct?
选项:
A:The output item must be given when calling function printf.
B:When calling function getchar to read in a character, we can input its corresponding ASCII code.
C:In C language, integers can be output in various forms, e.g. decimal, binary, octal and hexadecimal.
D:The header file stdio.h must be included before calling function putchar.
答案: 【The header file stdio.h must be included before calling function putchar.】
5、 问题:Assuming the following statements:char c1=’1′,c2=’2′;c1=getchar();c2=getchar();putchar(c1);putchar(c2);If input a└┘↙ when run the code, ↙ is used to represent Enter key, └┘ is used to represent space, which one of the following statements is correct?
选项:
A:The program will wait for the second character input by user.
B:Variable c1 is assigned the character a, and c2 remains the character 2.
C:Variable c1 is assigned the character a, and c2 remains uncertain value.
D:Variable c1 is assigned the character a, and c2 is assigned the space character.
答案: 【Variable c1 is assigned the character a, and c2 is assigned the space character.】
6、 问题:Given the following declarations and scanf function call statements, to make the value of a1, a2, c1, c2 to be 10, 20, A and B respectively. Which one of the following inputs is correct? ↙ is used to represent Enter key and └┘ is used to represent space. ( D )int a1,a2;char c1,c2;scanf("%d%d",&a1,&a2);scanf("%c%c",&c1,&c2);
选项:
A:1020AB↙
B:10└┘20↙AB↙
C:10└┘20└┘AB↙
D:10└┘20AB↙
答案: 【10└┘20AB↙】
7、 问题:Assuming the statement scanf("a=%d,b=%d,c=%d",&a,&b,&c); To make the values of a, b, and c to be 1, 3, 2 respectively, which of the following input is correct? ↙ is used to represent Enter key and └┘ is used to represent space.
选项:
A:132↙
B:1,3,2↙
C:a=1└┘b=3└┘c=2↙
D:a=1,b=3,c=2↙
答案: 【a=1,b=3,c=2↙】
8、 问题:If the variable x is of type double, which one of the following statements is right?
选项:
A:scanf("%f",x);
B:scanf("%f",&x);
本文章不含期末不含主观题!!
本文章不含期末不含主观题!!
支付后可长期查看
有疑问请添加客服QQ 2356025045反馈
如遇卡顿看不了请换个浏览器即可打开
请看清楚了再购买哦,电子资源购买后不支持退款哦