Zhejiang Univ. of Technology 2019/2020 Course Programming Design Class Name No. Mark L Single Choice Questions (2010 - 20%) 1. Which of the following variable name is not correct in C language? C ) A. welcome_to B. welcome to C. welcome2to D. welcomto 2. Which of the following statement is correct for reading data from a file? C ) A. scanf(file1,"%d",&a); B. fscanf(file1,"%d",a); C. fscanf(file1,"%d",&a); D. scanf(filel,"%d",a); 3. What is the result of the following statement: printf("wherelbis") ( ) A. where is B. wher is C. whereb is D. none of above 4. What is the result of the following statement: printf("%.38", 6.72); C ) A. 6.720 B. 6.72 C. 6.7. D. 6.00 5. How to print a character "a"? ( ) B. putchar("a") A. getche(a) D. none of above c. getchar(a) 6. Which of the following statement is not correct for initializing an array ( ) A. double record[5]={1,20,31); B. float a50)={11,22,33 ); D. int a-{33,67,93}; C. int aa[1+1}={12,22); 7. What is the scope of the variable if it is active only within the function in which it was defined? D. block scope ) A. file scope B. function scope C.prototype scope 8. int i=2, score[] = {1,2,3,4,5), what is the value of the a[i++]++? ( B.5 C. 3 D. 6 A.4 Page Zhejiang Univ. of Technology 2019/2020 Course Programming Design Class Name No. Mark L Single Choice Questions (2010 - 20%) 1. Which of the following variable name is not correct in C language? C ) A. welcome_to B. welcome to C. welcome2to D. welcomto 2. Which of the following statement is correct for reading data from a file? C ) A. scanf(file1,"%d",&a); B. fscanf(file1,"%d",a); C. fscanf(file1,"%d",&a); D. scanf(filel,"%d",a); 3. What is the result of the following statement: printf("wherelbis") ( ) A. where is B. wher is C. whereb is D. none of above 4. What is the result of the following statement: printf("%.38", 6.72); C ) A. 6.720 B. 6.72 C. 6.7. D. 6.00 5. How to print a character "a"? ( ) B. putchar("a") A. getche(a) D. none of above c. getchar(a) 6. Which of the following statement is not correct for initializing an array ( ) A. double record[5]={1,20,31); B. float a50)={11,22,33 ); D. int a-{33,67,93}; C. int aa[1+1}={12,22); 7. What is the scope of the variable if it is active only within the function in which it was defined? D. block scope ) A. file scope B. function scope C.prototype scope 8. int i=2, score[] = {1,2,3,4,5), what is the value of the a[i++]++? ( B.5 C. 3 D. 6 A.4 Page