uk milf stella paris strips and wanks at babestation

Welcome to the original primary and secondary education resources network!

Questions and answers of C language programming

Time: June 26, 2017 08:46:25 test questions I want to contribute

Questions and answers of C language programming

Everyone in the test programmer, C language program design you know? The following small edition of Ruiwen network for you to share C language programming questions and answers, for your reference.

Chapter I basic knowledge

1 Fill in the blanks

1. Each C program must have and only one________ Function.

2. There are six stages from the development of C language program to its execution, that is, editing, preprocessing, and Link, load, and execute.

3. Software is a program, and Use and maintain all required documentation.

4. It is stipulated in the national standard that "computer program is produced according to specific requirements and suitable for computer processing".

5. Programming language is generally divided into low-level language and low-level language according to the writing form and thinking mode________ There are two categories.

6. C language is composed of________ Composed of.

7. The functions of C language can be divided into main function, standard library function and uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.

8. A function is composed of two parts________ And function body.

9. Compiling is the source program written by C language________ It is also called the process of establishing object code program.

10. The program is compiled by some kind of programming language, which reflects the control idea of the programmer and the requirements of the computer operation. Different tasks and functions will require different software programs. For example, the system software program that controls the coordination of software and hardware of the computer itself and makes its equipment give full play to its effectiveness and is convenient for users to use is called operating system; The software programs developed for office automation (OA), management information system (MIS), artificial intelligence, e-commerce, network interconnection and other applications are collectively referred to as "uuuuuuuuuuuuuuuuuuuu.

11. Machine language is based on__________ Formal representation of the set of basic machine instructions is the only programming language that can be directly recognized and executed without translation. Compared with machine language, assembly language can be used to write programs_______ Also, labels and symbols can be used to replace addresses, constants and variables.

13. Before compiling the program, the____ The first line of code is preprocessed by the preprocessor.

14. C program is executed by_________ Start. 15. The function body is the part contained in {}. It is divided into________ And is an execution part composed of several C statements to complete functional tasks.

16. A simple statement in C language program is based on________ Character as the terminator.

17. C language is structured________ Programming language.

18. Because the computer hardware can not directly recognize the statements in the high-level language, it is necessary to go through the_______ The program written in high-level language can be translated into machine language program recognized by computer hardware.

19. The program written in high-level language needs to be translated into a machine language program recognized by computer hardware before it can be executed. Therefore, using high-level language programming, its programming efficiency is high, convenient and easy to use_______ Not as high as low-level languages.

20. The first teaching tool language that embodies the idea of structured programming is_______ Language.

Answer: 1. Main () 2. Compilation 3. Development 4. Instruction sequence 5. High level language 6. Function 7. Custom function 8. Function header 9. Translation 10. Application software 11. Binary code 12. Mnemonic 13. ? 14. Main function 15. Declaration part 16 Modularization 18. Translation 19. Execution speed

2. Pascal 2. Reading program and writing result solution: 3. Supplementary program solution: 4. Correcting mistakes solution: 5. Programming 1 solution: 6. Programming 2 solution: Chapter 2 constant, variable and expression 1. Fill in the blank 1. Take 16 bit computer as an example, if long int a is defined; Then variable a accounts for______ Bytes of memory space. 2. Take 16 bit computer as an example, if double a is defined; Then variable a accounts for______ Bytes of memory space.

3. Take 16 bit computer as an example, if long double is defined; Then variable a accounts for______ Bytes of memory space. 4. In______ Bit machine, int type takes 4 bytes Null type

5. The data types of C language include: basic data type, construction data type, enumeration type and.

6. In C language, the basic data types are as follows:______ 7. Convert integer constant 046 to decimal number equal to______ 8. The integer constant 054 is converted to a decimal number equal to.

9. The integer constant 0x125 is converted to a decimal number, which is equal to. 10. The integer constant 0x7c is converted to a decimal number equal to 11. The integer constant 39 is converted to octal to be equal to uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.

12. If the real number 473.468 is written in the form of normalized index, it should be

13. If the real number 0.0453 is written in the form of normalized index, it should be uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.

14. Convert 0x123 to binary equal to

______

15. The character 'a' is represented as hexadecimal equal to. 16. In C language, the identifier representing a constant is called \\\\\\\\\\\\\\\\\\\\. 17. In C language, the compiler preprocessing command is used______ To define symbolic constants,

18. In C language, a sequence of characters beginning with a backslash (\) followed by a character is called______ It is mainly used to indicate control and invisible characters or some graphic symbols. 19. The output of the result of the execution of the statement printf ("- 106") is. 20. The result output of the statement printf ("B") execution is. 21. The result output of the statement printf ("\ \ B") execution is. 22. The output of the result of the execution of the statement printf ("- 102") is. 23. If there is char ch1; ch1='a'+4; The output of the statement printf (% C, x) is. 24. String constant "Hello, everyone!" The memory space occupied is______ 25. String constant "Hello, Bob!" The memory space occupied is______ 26. A decimal integer constant consists of 0-9 data, but cannot be represented by______ 27. Hexadecimal constants are 0 ~ 9 and______ 28. Constants of type unsigned long are usually______ 29. Real constants usually have decimal form and______ 30. In C language, the compiler preprocessing command is used______ It is composed of two expressions of suffixes to contain other source files, which start with bytes and have no decimal part

31. In order to indicate the end of a string, the system automatically adds a to the end of the string, But not output

32. In C language, the variable whose value can be changed is called variable. It has three basic elements: variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name, variable name______ According to the C language, the identifier of a variable can only be composed of letters, numbers and underscores, and can not be replaced by______ Head. open

34. In a 16 bit computer, sizeof ("hello" is equal to uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 35. In a 16 bit computer, printf ("\" Hello \ ") is equal to \\\\\\\\\\\\\\\\. 36. Character variable occupied in memory______ Bytes of storage space.

37. If defined, int x = 27, y = 6; If defined, int x = 47, y = 8; Then the value of the expression x% y is

39. If there is a definition, char ch1 = a ', CH2, CH3; Execute CH2 = ch1 + +; ch3=++ch1; printf("ch1=%c, ch2=% c",ch1,ch2); The output is. 40. If there is a definition, char ch1 = a ', CH2, CH3; Execute CH2 = ch1 + +; ch3=++ch1; printf("ch2=%c, ch3=% c",ch2,ch3); The output is. 41. If defined, int i = 5, J, K; Execute J = I --; k=--i; printf("i=%d, j=%d\n", i, j); The output is. 42. The value of expression (int) (13.7 + 25.6) / 4% 5 is. 43. The value of expression 3.6-5 / 2 + 1.2 + 5% 3 is. 44. The value of expression 54% 10 / 2 + 4.0 * (8 / 5) is. 45. If int x is defined; double b=5.45; When x = B is executed, the value of X is. 46. If int y is defined; char c='A'; When y = C is executed, the value of Y is 47; float b=2.5; If a = 5, the value of a / (int) (b) is 48. If a = 5, the value of a after executing a * = 7-3 statement is.

49. If int a = 1, B = 0, C = 4, d = 2; Then the expression (a > b? a: The value of B) & (C-D) is. 50. Given a = 0, the expression a = 1? b = 1b = 0; If int m = 7, n = 12; Then the value of the expression n% = M-M% 5 is uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.

______

52. If int a = 8 is defined; float b=4.5; After executing a * = A / = A-B, the value of a is uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 53. int a=2; ! The value of a + + is uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.

54. int a=0; ! The value of a + + and + + A is

55. int a=7; float b=4.5; Then the value of printf ("% d", a * = A / = a-b) is uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 56. int k=7; float a=2.5,b=4.7; Then the value of the expression a + k% 3 * (int) (a + b)% 2 / 4 is uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 57. #define Max(a,b) (((a)-(b))&0x80000000)?( a):(b),int a=2,b=6; The value of printf ("% D-N", max (a, b)) is \\\\\\\\\\\\\\\\\\\\\\\. 58. In 32-bit computers, int a = 4, B = 7; The value of printf (% 0x, a-b) is: uuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 59. int x,y,z; x=y=2; z=3; y=x++-1; The value of printf (% D,% D, x, y) is: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.

60. int i=2,j; The value of printf (% D, j = I < 1) is:______ Answer: 1.0 2.4 3.10 4.32 5. Pointer type 6. Int, float, double, char 7. 38 8. 44 9. 293 10. 124 11. 047 12. 4.734680e + 002 13. 4.530000e-002 14. 100100011

15. X41 / 41h 16. Sign constant 17. Define 18. Escape character constant 19. F 20. B 21. B 22. B 23. E 24. 16 25. 11 26. 0 27. A ~ F 28. U 29. Exponential form

37. 4 38. 7 39. ch1=C, ch2=A 40. ch2=A, ch3=C 41. i=3, j=5 42. 4 43. 4.800000 44. 7.000000 45. 5 46. 65 47. 4 48. 20 49. 1 50. 1 51. 2 52. 4 53. 0 54. 0 55. 4 56. 2.500000 57. 2 58. fffffffd

59. 31 60. 0

2. Read the program and write the results

3. Supplementary program answers:

4. Correct the problem

5. Programming 1 answer:

6. Programming 2 answer:

Chapter 3 sequence structure

1 Fill in the blanks

1. The statements in C language can be divided into five categories: control statements, control statements, and Function statement, coincidence statement and empty statement.

2. The functions commonly used for character input are: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.

3. The functions commonly used for character output are: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.

4. The functions commonly used for string input are: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.

5. The functions commonly used for string output are: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 6. The general form of the format input function is: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 7. The general form of format output function is: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 8. Printf and scanf are standard library functions, and their function prototypes are in the header file________________ Medium. 9. If there is char ch, the input statement in the format assigned to ch from the keyboard is as follows:. 10. If you want to output the string constant "Hello word!", Then, the format output statement is: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 11. It has a definition: long x = - 123456l, Write a statement that can output the value of variable x correctly. 12. If there is int a, B, Want to pass scanf ("% d% d", & A, & B); If the input statement is assigned 1 to a and 2 to B, then the

The input data is in the form of. 13. If there is int i, J; scanf("i=%d,j=%d";& i,&j); If you want to assign 10 to I and 20 to j, then you should enter uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu from the keyboard. 14. I, J and K are known as int variables. If I, 2, 3 < ENTER > are input from the keyboard, so that the value of I is 1, the value of J is 2, and the value of K is 3, please write the correct input statement. 15. Have int m, N, p; scanf("m=%dn=%dp=%d",&m,&n,&p); printf("%d%d%d\n",m,n,p); If you want to input data from the keyboard, so that the value of M is 123, the value of n is 456, and the value of P is 789, the correct input is uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 16. There is int a; float b, c; % f\n", a, b, c); scanf("%2d%3f%4f",&a,&b,&c); printf("\na=%d, b=%f, c=

If 9876543210 < ENTER > is input from the keyboard at runtime, the output of the program is uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. 17. There are int, M = 0256, n = 256; Then printf ("% o% O / N", m, n); The output of is. 18. There is int x = 102, y = 012, Then printf ("% 2D,% 2D \ \ n", x, y); The output of is. 19. There are definitions and statements: int a; char c=10; float f=100.0; double x; a=f/=c*=(x=6.5); Then printf ("% d% d% 3.1f% 3.1f / N", a, C, F, x); The output of is. 20. If there are definitions and statements: int m = 0xabc, n = 0xabc; m-=n; Then printf (% O / N, m); The output of is. 21. If there is int m = 32, n = 032, Then printf ("% D,% X / N", m, n); After execution, the output result is. 22. If int a = 1234, Then printf (% 2D / N, a); The output of is. 23. If the variable has been correctly described as float type, the statement "scanf" ("% F% F% F", & A, & B, & C) should be used; Assign a to 10.0, B to 22.0, C to 33.0, and the incorrect input form is uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. A) 10 < ENTER > 22 < ENTER > 33 < ENTER > b) 10.0, 22.0, 33.0 < ENTER > C) 10.0 < ENTER > 22.0 33.0 < ENTER > d) 10 22 < ENTER > 33 < ENTER > b) 10.0, 22.0, 33.0 < ENTER > C) 10.0 < ENTER > 22

24. If there is int x = 3, y = 1; Then printf (% d% D / N, x + +, y + 2); The output of is. 25. If there are definitions and statements: Double D; float f; long l; int i; i=f=l=d=20/3; Then printf ("% d% LD% F% F / N", I, l, F, d); The output of the is (write only one digit after the decimal point). 26. What is correct in the following statement is. A) Define and printf are both C statements. B) # define is a C statement, but printf is not c) printf is a C statement, but ? define is not d) ? define and printf are not C statements 27, Then printf ("% D,% O,% X \ \ n", K, K, K); "; The output of is. 28. What is correct in the following statement is. A) The input can be a real constant, such as scanf ("% F", 3.5); B) Only format control, no input items, can input data into memory correctly, for example: scakf ("a =% D, B =% d"); C) When inputting data, the variable address must be specified, for example: scanf ('% f', & F); 29. If there are definitions and statements: int u = 010, v = 0x10, w = 10; Then printf ("% d%, d% D, n", u, V, w)); The output result is. If there is int, a = 1, B = 4, C = 2; float x=10.5, y=4.0, z; z=(a+b)/c+sqrt((double)y)*1.2/c+ x; Then printf ("% F / N, z)); The output of is. 31. If there is int, a = 2, C = 5, Then printf ("a =%% D, B =%% D, n", a, c); The output of is. 32. There is char C; int n=100; float f=10; double x; x=f*=n/=(c=50); Then printf ("% d% F-N", N, x); The output of is. 33. There are int i = 0, j = 0, k = 0; scanf("%d%*d%d",&i,&j,&k); printf("%d%d%d\n",i,j,k); If input from the keyboard: 10 20 30 < ENTER >. The output result is. 34. If there is int a, B, C; a=25; b=025; c=0x25; Then printf ("% d% d% D / N", a, B, c); The output of is. 35. There are the following statements: int N1 = 10, N2 = 20; printf(________________, n1,n2); The values of N1 and N2 are required to be output in the following format. Each output line starts from the first column. Please fill in the blank. If there is a sentence int i = - 19, j = I% 4; Then printf (% D / N, J); The output of_____________________

37. There is int a = 0; a+=(a=8); Then printf (% D / N, a); The output of is. 38. There is int a = 1, B = 2; a=a+b; b=a-b; a=a-b; Then printf ("% D,% D, n", a, b); The output of is. 39. There was an unsigned short a = 65536; int b; Then printf ("% D / N", B = a); The output of is. 40. The statement printf ("10289 / N"); The result of the data for is: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. Answer: 1. Expression statement 2. Getchar() 3. Putchar() 4. Gets() 5. Puts() 6. Scanf ("format control string", address table column); 7. Printf ("format control string", output table column); 8. stdio.h 9. scanf (%c &ch); 10. printf (%s HelloWord!); Or: printf ("Hello word!"); 11. printf(x=%1d\n,x); 12. 12. 1 2 or 1 2 13. I = 10, j = 20 14. Scanf ("% d%, d%, D", & I, & J, & K); 15. m=123n=456p=789

16. a=98, b=765.000000, c=4321.000000 17. 256 400 18. 102,10 19. 1 65 1.5 6.5 20. 0 21. 321a 22. 1234 23. B 24. 3 3 25. 6 6 6.0 6.0 26. D 27. 172111 28. C 29. 8,16,10 30. 13.700000 31. a=%d,b=%d 32. 2 20.000000 33. 10300 34. 25 21 37 35. n1=%d\nn2=%d 36. -3 37. 16

In the keywords of if, while, case, do, else, there are (). 2; Then if (a = 2) printf (% D, 2); else printf("%d", 1); 3. Known char a ='a '; Then if (a > 65) printf ("% s", "bigger"); else printf("%s" , "smaller"); 4. The C language expression for "x y Z" is (5) in C language, the statements used to implement the selection structure are (. 6. To judge whether two floating-point variables X and y are equal or not: if (7. With program section: T = 6; a=7; b=8; if(a=b) t=a;, After this program is executed, the result of T is (. 8. Let a = 1, B = 2, C = 3, d = 4, then the result of the expression: a > b? A: C > d? A: D is (9. The value of expression 98 & & 8 & & 31 & (98 -'a ') is (10. If int a = 3; Then the expression (a > 2) & &! (' The value of d '> 69) is ().).) Statement and ().) sentence

<1e-6 )? )

Answer: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 2; x=7; y=9; if(x

2. #include void main( ) { int x=1,a=2,b=3; switch(x) { case 1: case 2: case 3: a--; break; b++; break; a++; b++;

} printf("\na=%d,b=%d\n",a,b); }

3. #include void main( ) { char ch1 = 'E'; if(ch1 >= 'A') ch1++; else ch1+=32; printf("ch1 = %c\n", ch1); }

4. #include void main( ) { int x,y,t; x=5; y=3;

if(x>y) { t=x; x=y; y=t;} printf("%d,%d\n" , x,y ); }

5. #include int main() { int a,b,c,m; printf("Enter three integers:"); scanf("%d%d%d",&a,&b,&c); if(a<=b) m=a; else m=b; if(c

6. #include int main() { char ch1='a',ch2='B',ch3='E'; if(ch1>ch2) if(ch2>ch3) else --ch3; printf("ch3=%c\n",ch3); return 0; }

ch3++;

daddy4k papa intelligent ne perd pas sa chance davoir des relations sexuelles avec ses fils nouvelle copine lustful old granny rides two cocks vrallure busty ebony beauty daizy cooper plays with her sex toys in virtual reality loan4k le banquier est pret a aider une fille si elle donne quelque chose en retour daddy4k sweetie and boyfriends old dad celebrate her birthday with sex