c语言试题(C language test questions)
c语言试题(C language test questions)
C language programming, fall semester, 2012
Job submission format: ask your students to write the answer separately in a.Doc document and upload it as an attachment (don't fill the questions directly in the air). Special requirements format is as follows:
One, ABCDD AAAAA
Two,
The title number is 910
The v v v v x x x x x x
Three,
(1) BeiJing
ShangHai
(2) x=8, y=7
(3) r=k:i+j=90
......
The above is just an example, not the correct output. Please write and submit the result of the work according to the above regulations. The homework that does not conform to the above regulations will be treated as 0.
Encourage independent work, and severely punish plagiarism.
Chapter 1 homework
First, the number 213, 12.75, 79.375 in sixteen hexadecimal
Answer: 0xD5, 0xC.C, 0x4f.6
Two fill in the blanks
1. in C, the decimal value of the numeric constant 0x9f is 159.
The ASCII code for the 2. letter A is the decimal number 97.
Answer:
Two,
1) 159
2) 97
The third chapter homework
First, the multiple-choice question:
1 、 in the following variable names, B is illegal.
(A) MyCar B) 4A C) my_car D) a48
2 、 in the following variable names, B is legal.
(A) 56A B) _abc C) 48b D) while
3 、 in the following constants, B is the int type constant represented by sixteen decimal.
A) 78, B) 0x7a C) X56 D) 063
4 、 assuming all variables are integers, then the value of the expression (a=2, b=5, b++, a+b) is B.
A) 7, B) 8, C) 6, D) 2
5, the known C2 is character type, then execute the statement c2= 'A' + '6' - '3' after the C2 value of B.
A) C 'B') 'D' C) uncertain value D) 70
6, a is an integer variable, B is a character type variable, C is a double type variable, and a+b+c is a (C) type
(A) int B) float C) double D) char
7, the characters that cannot be used as identifiers in the C language are (C)
A alphabet
B numbers
C%
D underline
8, let int a; then the expression a=2,4, the value of a+1 is (C)
A.1
B.2
C.3
D.4
9. let a be an integer variable, B is a char