1. Trang chủ
  2. » Tất cả

17-18,HK2_C Programming Language(CLC)Mau 3

5 1 0

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 157,99 KB

Nội dung

HCMC University of Technology and Education Faculty for High Quality Training ECET Supervisory Signature Supervisory Signature Final exam of the semester 2, 2017-2018 Course: C Programming Language Course code: PRLA335164E Number of pages: 05 pages Duration: 90 minutes Only used one A4-handwriting paper Points and Signatures The first marking lecturer The second marking lecturer Students work directly on the test and submit all First and last name: Student ID: Order number: Room: Question (2.0 points): Give a following program, please perform: a) Draw a flowchart? b) Show results on the screen after performing the program? # #include int main (void) { int a = 10, b = 5, c = 17, d=2; if ((a > b) && (b (x + i + 1)) return 0; } return 1; } - Assume that the above program is edited correctly When five numbers 4, 5, 6, 7, are inputted from the screen, what are results showed on the screen next (1.0 point)? Question 5: (1.5 points) Write a complete program which executes functions as follows: a) Create a structure type, named SensorNode, to describe a Sensor Node The Sensor Node will collect temperatures and includes information as follows:  Node Code (named NodeCode): string format  Temperature value (named Temp): real number format b) Enter information including Node Code and Temperature value of 20 different Sensor Nodes c) Print all information of three Sensor Nodes on the screens which collect high temperature values 1st, 2nd and 3rd Notation: Supervisor officials are not allowed to explain the exam questions Expected Learning Outcomes (About knowledge) Test contents [G1.1, G1.3]: Draw a flowchart, demonstrate command syntax, operation and application of branching and iteration structures in C Questions 1, language [G1.5]: Present how the pointer is declared and how to use the pointer to retrieve the memory Questions 3, [G1.6]: Use function in a program Question [G1.7]: Define structure type and use structure variables to store and manage data Question [G2.1]: Analyze the programming requirements from which to build a flowchart, a complete program Questions 1, 2, [G3.1]: Apply control structures, apply data manipulation, build support functions to design and solve application programming requirements Questions 2, May 23th, 2018 Head of ECET ... Questions 1, 2, [G3.1]: Apply control structures, apply data manipulation, build support functions to design and solve application programming requirements Questions 2, May 23th, 2018 Head of... memory Questions 3, [G1.6]: Use function in a program Question [G1.7]: Define structure type and use structure variables to store and manage data Question [G2.1]: Analyze the programming requirements... int y) int Function3(int *x, int y); void main() { int *array, n, i; scanf("%d", &n); array = (int *)malloc(n,sizeof(int)); if (array != NULL) { Function1(array, n) if (Function3(array, n) == 1)

Ngày đăng: 16/06/2021, 18:17