C Language Review Questions I. Selective Questions: 1.The following features that are not characteristic of C language are (B) A.C language is concise and compact. B. It can compile complex programs. C. C language can operate hardware directly. D. C language has good portability. 2. The following incorrect C language identifier is (D). A.ABC B.a BC C.a_bc D.ab.c 3The execution of a C program is from (A). The A. main () function starts until the main () function ends B. The first function starts until the last one ends. C. The first statement begins until the last one ends. D. main () function starts until the last function ends 4The following incorrect statement (with int p, q) is (D). A.P*=3; B.p/=q; C.p10=3; D.p&q 5Among the following four groups of options, the options that are not C keywords are (A). A.define B.getc C.include D.while If char sanf go Type printf case pow 6Among the following four options, the one that is valid plastic constants is (A). A.160 B. -0xcdf C. -01 D. -0x48a - 0xFFFF 01A 986,012 2e5 0110 Xe 0668 0x 7. Among the following four options, the illegal floating-point number option is (B). A.160.B.123 C. -.18 D. -e3 0.122e4.2 123e4 0.234 E3.e5 0.01 E3 8. If there is algebraic expression 3ae/bc, the incorrect C expression is (C) A.a/b/c*e*3 B.3*a*e/b/c C.3*a*e/b*c D.a*e/c/b*3 9. If the following variables are all integers and num = sum = 7, then the value of sum after expression sUM = num++, sUM++, ++ num is (A). A.7 B.8 C.9 D.10 10.If defined: int a = 7; float x = 205, y = 4.7; then the value of expression x + a% 3* (int) (x + y)% 2/4 is (A). A.2.500000 B.2.750000 C.3.500000 D.0.000000 11. Sizeof (float) is (B). A. A double-precision expression B. An integer expression C. A Function Call D. An Illegal Expression 12. Let int n = 3; then the result of N ten is (B). A.2 B.3 C.4 D.5 13. Description: char w; int x; float y; double z; then the data type of the expression w*x+z-y value is (D). A. float B. char C. int D. double. 14. If x, y are defined as int type, Z is defined as double type, and the following illegal scanf function call statement is (D). A. scanf ("% d% d1x,% 1e", & x, & y, & z); B. scanf ("% 2d*% d% 1f", & x, & y, & z); C. scanf ("%x%*d%o", & x, & Y); D. scanf ("% x% o% 6.2f", & x, & y, & z); 15. The following statement is correct (D). A. The input can be a real constant, such as scanf ("% f", 3.5); B. Only format control, no input items, can also be correctly input, such as scanf ("a=% d, b=% d"); C. When inputting a real data, the format control part should specify the digits after decimal points, such as scanf ("% 4.2f", & f); D. When entering data, the address of variables, such as scanf ("% f", & f), must be specified. 16. The result of execution of the following program is (A). # include < stdio.h > Main () { Int sum, pad; Sum=pad=5; Pad=sum++; Pad++; ++pad; Printf ("% d n", pad); } A.7 B.6 C.5 D.4 17. The ASCII code of the letter A is 65. The results of the following procedures are (D). # include < stdio.h > Main () { Char c1=&apos;A&apos;, C2=&apos;Y&apos;; Printf ("%d,%d\n,%c1, c2); A.A., Y B.65, 65 C.65, 90 D.65, 89 18. To avoid the ambiguity of nested if-else statements, C language stipulates that else always pairs with (C). A. If the indentation position is the same B. Matching before and after if C. The most recent if not matched before D. If on the same line 19. Data type (D) of operation object on both sides of logical operator. A. Can be 0 or 1 B. Can only be zero or non-zero positive numbers C. Integer or character data only D. Can be any type of data 20. Let x, y and Z be int variables, and x = 3, y = 4, z = 5, then the mean value of 0 in the following expression is (D). A.&apos;x&apos;&&&apos;y&apos; B.x < = y C. x {y+z &&y-z D.!((x < y) & Z {1) 21. If we hope that when the value of A is odd, the value of expression is "true" and when the value of A is even, the value of expression is "false".The following expressions that do not meet the requirements are (C). A.A%2==1 B.! (A%2==0) C.! (A%2) D.A%2 22. The following incorrect if statement form is (C). If (x > y & & x! = y); B.if(x=y)x10=y; C. if (x!= y) scanf ("% d", & x) e1se scanf ("% d,& y); D.if(x<y){x ten; y ten;} 23. The following if statement is grammatically correct (B). A.if (x > 0) Printf ("% f", x) Else printf ("%f", -x); B.if (x > 0) {x = x + y; printf ("% f", x);} Else printf ("%f", -x) C.if (x > 0) {x = x + y; printf ("% f", x);} Else printf ("%f", -x) D.if (x > 0) {x = x + y; printf ("% f", x);}

docxDoc C Language Review Questions

Professional Docs > Common > Other > Preview
21 Pages 0 Downloads 220 Views 3.0 Score
Tips: Current document can only be previewed at most page8,If the total number of pages in the document exceeds page 8,please download the document。
Uploaded by admin on 2019-10-15 12:02:54
You can enter 255 characters
What is my domain?( answer:www.45doc.com )
  • No comments yet