Đề thi học kì 1 môn Kỹ thuật lập trình năm 2017-2018 - Trường Đại học Bách Khoa TP. Hồ Chí Minh (Final exam semester 1 of Programming Fundamentals)

15 43 0
Đề thi học kì 1 môn Kỹ thuật lập trình năm 2017-2018 - Trường Đại học Bách Khoa TP. Hồ Chí Minh (Final exam semester 1 of Programming Fundamentals)

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Đề thi học kì 1 môn Kỹ thuật lập trình năm 2017-2018 - Trường Đại học Bách Khoa TP. Hồ Chí Minh (Final exam semester 1 of Programming Fundamentals) cung cấp cho bạn tài liệu ôn tập, luyện tập nhằm nắm vững được những kiến thức, kĩ năng cơ bản, đồng thời vận dụng kiến thức để giải các bài tập lập trình một cách thuận lợi. Mời các bạn cùng tham khảo đề thi.

FINAL EXAMINATION Course: Programming Fundamentals CourseID: CO1013 Date: Tuesday, January 09, 2018 Time: 90 minutes Type: closed-book examination with no electronic equipment Exam Code: Student Name: Student Identifier: F17101 General information: - - - This examination includes three parts Part A consists of 24 multiple choice questions each of which has a max grade of 0.25 Part B consists of writing questions each of which has a max grade of 2.0 Part C is your answer area For the questions in Part A, please use a mark (check or cross-check) for an answer with a, b, c, or d If you have another answer that does not match any among a, b, c, and d, please choose e Others and then write your answer in the Others answer section If you make another choice, please delete your previous choice by marking a deletion on it If you choose an answer and then delete it multiple times, please write your final answer to that question explicitly in Part C For the questions in Part B, programs in your answers must be written in the C language and the coding style must be considered For any comments or suggestions on the examination, please feel free to write them down at the end of Part C Part A Multiple choice questions Q.1 Which statement is correct about C? a C is a high-level typed programming language using a compiler for code translation b Source codes written in C can be run on any machine with at least one main() function c Anybody can create a C program for his/her own purpose on a computer d Answers a, b, and c are all correct e Others Q.2 Which declaration is valid for a variable that keeps the number of students in class? a char number[5]; b unsigned int number; c int *number; d char *number; e Others Q.3 Which identifier is valid for a variable that keeps a floating-point number for a grade? a float grade_2; b float 2_grade; c float _@grade; d float &_grade; e Others Q.4 Which data type has the largest range with the smallest minimum value and the largest maximum value for its variables? a char b unsigned int c int d long int e Others Q.5 Given variables: aPtr, aVal, and anExp, which expression is incorrect? a ('A' + 32)^1.5 b ('ptr' + 's')*2 - &aPtr c (anExp/'a' - *aPtr)*aVal + d (*&aVal + 2)/anExp*10-'2' e Others Q.6 Which function call allows receiving a character value and a double value in sequence input by a user from the keyboard? a scanf("%c%f", 'a', &1.23456); c scanf("%c%lf", &var1, &var2); b scanf("%f%c", &var1, 'a'); d scanf("%lf %c", &var1, &var2); e Others Q.7 Which function call allows printing a positive number 123 with a plus sign and left justification? a printf("%+123d"); c printf("%-+d", 123); b printf("%+d", +123); d printf("%-+f", 123); e Others Q.8 Given the following statements, what is printed on screen if input is -2? int aMin = 5, input; aMin>input?printf("less than aMin"):printf("greater than or equal to aMin"); a "less than aMin" c "greater than or equal to aMin" b printf("less than aMin") d printf("greater than or equal to aMin") e Others Q.9 Given the following statements, what is printed on screen? int a=10, b=5, c=0; if (b+c

Ngày đăng: 13/07/2021, 12:18

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan