wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

IPTM Midterm EXAM | Sec 2 12 Mar 2021

Total questions: 55

Worksheet time: 2hrs 58mins

Name
Class
Date
1.

อัลกอริทึมใดใช้สำหรับการแปลงนิพจน์ทางคณิตศาสาตร์

a)

Queue

b)

Array

c)

Stack

d)

Tree

2.

จงพิมพ์คำสั่งสำหรับการรับค่าจำนวนเต็มเข้าสู่ตัวแปร X

(a)  

3.

Array นี้มีขนาดเท่าไร A[6..10]

a)

5

b)

10

c)

20

d)

30

4.

ข้อใดเป็นโครงสร้างข้อมูลเชิงเส้น

a)

Tree

b)

Graph

c)

Stack

d)

File

5.

ข้อใดเป็นโครงสร้างข้อมูลแบบไม่เชิงเส้น

a)

Tree

b)

List

c)

Queue

d)

String

6.

ข้อใดเป็นข้อมูลเบื้องต้น (Primitive Data Types) ทั้งหมด?

a)

Integer, Floating Point, Boolean

b)

Real, Character, Stack

c)

List, Queue, String

d)

Graph, Tree, Real

7.

ข้อใดเป็นข้อมูลประเภทจำนวนเต็ม (Integer)

a)

19.451

b)

SOS

c)

5

d)

1.7E+38

8.

ข้อใดเป็นข้อมูลประเภทอักขระ (Character)

a)

19.451

b)

SOS

c)

5

d)

1.7E+38

9.

ข้อใดไม่ใช่การดำเนินการกับโครงสร้างข้อมูล (Data Structure Operation)

a)

การเข้าถึงข้อมูล (Traversing)

b)

การค้นหา (Searching)

c)

การเพิ่ม (Inserting)

d)

การเรียงข้อมูล (Sorting)

10.

ข้อใดเป็นการจัดการข้อมูล ในการจัดการโครงสร้างข้อมูล

a)

การเรียงข้อมูล (Sorting) , การรวมข้อมูล (Merging)

b)

การเพิ่ม (Inserting), การลบ (Deleting)

c)

การเข้าถึงข้อมูล (Traversing) , การค้นหา (Seraching)

d)

การเรียงข้อมูล (Sorting) , การค้นหา (Searching)

11.

การแทนที่ข้อมูลในหน่วยความจำหลัก มีกี่แบบ?

a)

1 แบบ สแตติก (Static Memory Representation)

b)

2 แบบ ไดนามิก (Dynamic Memory Representation)

c)

2 แบบ สแตติก (Static Memory Representation), ไดนามิก (Dynamic Memory Representation)

d)

2 แบบ สแตติก (Static Memory Representation), ฟลูอิท (Fluid Memory Representation)

12.

การแทนที่ข้อมูลแบบสแตติก (Static Memory Representation) มีข้อเสียคือ ?

a)

ไม่สามารถปรับขนาดให้เพิ่มหรือลดได้

b)

กำหนดขนาดก่อนการใช้งาน

c)

ยืดหยุ่นต่อการใช้งาน

d)

ไม่ต้องจองเนื้อที่

13.

การแทนที่ข้อมูลแบบไดนามิก (Dynamic Memory Representation) มีข้อดีคือ?

a)

ไม่สามารถปรับขนาดให้เพิ่มหรือลดได้

b)

กำหนดขนาดก่อนการใช้งาน

c)

เนื้อที่แบบคงที่

d)

ไม่ต้องจองเนื้อที่

14.

ลักษณะของการเขียนโปรแกรมแบบที่มีโครงสร้าง รูปแบบใดที่มีการตรวจสอบเงื่อนไขก่อน?

a)

โครงสร้างแบบลำดับ (Sequence)

b)

โครงสร้างแบบทางเลือก (Decision)

c)

โครงสร้างแบบวงจร (Loop)

d)

ไม่มีข้อใดถูก

15.

ลักษณะของการเขียนโปรแกรมแบบที่มีโครงสร้าง รูปแบบใดที่มีการทำงานซ้ำกันอยู่ในส่วนใดส่วนหนึ่งของโปรแกรม?

a)

โครงสร้างแบบลำดับ (Sequence)

b)

โครงสร้างแบบทางเลือก (Decision)

c)

โครงสร้างแบบวงจร (Loop)

d)

ไม่มีข้อใดถูก

16.

โปรแกรมที่มีโครงสร้างที่ดี คือ ?

a)

มีจุดเข้าและออกหลายจุดตามเป้าหมาย

b)

ออกแบบลักษณะบนลงล่าง (Top down design)

c)

เป็นโปรแกรมที่ทำหน้าที่หลายอย่าง

d)

มีวงจรแบบไม่หยุดมีค่าอนันต์ (Infinity)

17.

อัลกอริทึมแบบแตกย่อย (Divide-and-Conquer) มีหลักการทำงานคือ ?

a)

แบ่งครึ่ง, ผสาน

b)

หาเส้นทางที่ดีที่สุด

18.

จากภาพเป็นการออกแบบ (Design) ที่เรียกว่า?

a)

ผังงาน (Flowchart)

b)

รหัสเทียม (Pseudo Code)

c)

โค้ท (Code)

d)

ภาษาซี (C Language)

19.

จากภาพเป็นการออกแบบ (Design) ที่เรียกว่า?

a)

ผังงาน (Flowchart)

b)

รหัสเทียม (Pseudo Code)

c)

โค้ท (Code)

d)

ภาษาซี (C Language)

20.

สัญลักษณ์ใดที่ใช้แทนการตัดสินใจในการเขียนแผนผังงาน (Flowchart)

a)

A

b)

B

c)

C

d)

D

21.

สัญลักษณ์ใดที่ใช้แทนการรับหรือแสดงข้อมูลในการเขียนผังงาน (Flowchart)

a)

A

b)

B

c)

C

d)

D

22.

สัญลักษณ์ใดแทนกระบวนการย่อยในการเขียนผังงาน (Flowchart)

a)

A

b)

B

c)

C

d)

D

23.

สัญลักษณ์ใดแทนการแสดงข้อมูลทางจอภาพในการเขียนผังงาน (Flowchart)

a)

A

b)

B

c)

C

d)

D

24.

คำสั่งใดใช้ในการแสดงผลข้อมูลทางหน้าจอภาพ ในภาษาซี

a)

printf

b)

scanf

c)

operation

d)

loop

25.

คำสั่งใดใช้ในการเก็บค่า ในภาษาซี

a)

printf

b)

scanf

c)

operation

d)

loop

26.

คำสั่งได้สามารถใช้งานได้อย่างถูกต้อง

a)

Printf("%d",number)

b)

Printf("%d",number);

c)

printf("%d",number)

d)

printf("%d",number);

27.

Format Code "%c" ใช้สำหรับการแสดงผลประเภทใด

a)

decimal Interger

b)

character

c)

floating point number

d)

string

28.

Format Code "%d" ใช้สำหรับการแสดงผลประเภทใด

a)

decimal Interger

b)

character

c)

floating point number

d)

string

29.

#include <stdio.h>

main()

{ printf("%d",10);

printf("%s","abc");

printf("%2.2f",10.01);

printf("%c",'a'); }

ได้ผลลัพธ์คือ

a)

10 abc 10.01 a

b)

10s10.01a

c)

10abc10.01a

d)

10abc10.0100a

30.

#include <stdio.h>

main()

{ int score;

scanf("%d",&score);

if(score >= 80)

printf("Your grade is A\n");

} ถ้ากรอกข้อมูล = 75 จะแสดงผลอะไร?

a)

75

b)

80

c)

ไม่แสดงผล

d)

Error

31.

#include <stdio.h>

main()

{ int score;

scanf("%d",&score);

if(score >= 60)

printf("Your grade is satisfied\n");

else

printf("Your grade is unsatisfied\n");

}

ถ้ากรอกคะแนน = 45 ระบบจะแสดงข้อมูลใด?

a)

45

b)

Your grade is satisfied

c)

Your grade is unsatisfied

d)

Error

32.

#include <stdio.h>

main() { int x;

scanf("%d",&x);

while (x < 0) { printf("%d is a negative number\n",x);

scanf("%d",&x);

}

printf("%d is not negative number\n",x);

}

หากกรอกเลข 4 จะแสดงผลอะไร?

a)

4 is a negative number

b)

4 is not negative number

c)

is a negative number

d)

is not negative number

33.

จากภาพเป็น Array กี่มิติ

a)

1D Array

b)

2D Array

c)

3D Array

d)

6D Array

34.

A[2:9] มีขนาดมิติ (Dimension) เท่าใด?

a)

2

b)

8

c)

9

d)

11

35.

A[2:9] ขอบเขตต่ำสุด (Lower Bound) คือ

a)

2

b)

8

c)

9

d)

11

36.

จงคำนวณพื้นที่ที่ใช้งานใน Memory ของ Array A[1930..1949] โดยสมาชิกแต่ละตัวใช้พื้นที่ขนาด 4 Byte

a)

20 Byte

b)

40 Byte

c)

60 Byte

d)

80 Byte

37.

จงคำนวณพื้นที่ที่ใช้งานใน Memory ของ Array A[1930..1949] โดยสมาชิกแต่ละตัวใช้พื้นที่ขนาด 4 Byte ตำแหน่งของ A[1930] อยู่ที่ 100 ตำแหน่งของ A[1940] คือตำแหน่งที่เท่าใด

a)

104

b)

120

c)

140

d)

180

38.

จงหาจำนวนช่องของ Array B[-20..0]

a)

20

b)

21

c)

0

d)

1

39.

จงหาจำนวนช่องของ Array B[1..6,1..4]

a)

4

b)

6

c)

24

d)

35

40.

จงหาจำนวนช่องของ Array C[1..6,1..4,1..3]

a)

24

b)

48

c)

72

d)

96

41.

ถ้าแสดงตำแหน่งของ Pointer (*) ของ Count เก็บไว้ใน Ptr ต้องใช้คำสั่งใด

a)

ptr = &count;

b)

ptr = *count;

c)

ptr = &ptr;

d)

ptr = *ptr;

42.

ข้อใดได้ค่าเท่ากับ 25

a)

printf("%d",&a);

b)

printf("%d",&b);

c)

printf("%d",&c);

d)

printf("%d",*ptr);

43.

จงออกแบบ Structure ของการเก็บข้อมูลบนบัตรประจำตัวประชาชน

ตัวอย่าง Struct People{

Char name [30];

} personnel;

4 lines
44.

ข้อใดเป็นรูปแบบของ Doubly Linked List

a)

A

b)

B

c)

C

45.

ข้อใดเป็นรูปแบบของ Circular Linked List

a)

A

b)

B

c)

C

46.

Node สุดท้ายของ Linked List จะชี้ไปที่ค่าใด

a)

1000

b)

2000

c)

3000

d)

NULL

47.

ส่วนใดของของ Node ใน Linked List ทำหน้าที่เก็บข้อมูล

a)

Data Field

b)

Link Field

c)

Node Field

d)

NULL

48.

Linked Lists มีการจองหน่วยความจำแบบใด

a)

Static

b)

Dynamic

c)

Static & Dynamic

d)

ไม่มีข้อถูก

49.

Linked Lists ไม่สามารถนำไปประยุกต์ใช้ในโครงสร้างข้อมูลแบบใด

a)

Stack

b)

Queue

c)

Tree

d)

Graph

e)

ผิดทุกข้อ

50.

ภาพลำดับในภาพแสดงถึงขั้นตอนการ Push

a)

1

b)

2,3

c)

2,3,4

d)

5

51.

ภาพลำดับในภาพแสดงถึงขั้นตอนการ Pop

a)

1

b)

2,3

c)

2,3,4

d)

5

52.

ภาพลำดับในภาพแสดงถึงขั้น Empty Stack

a)

1

b)

2,3

c)

2,3,4

d)

5

53.

จงแปลงนิพจน์ทางคณิตศาสตร์จาก Infix เป็น Postfix

A*B+C-D/E

(a)  

54.

จงอธิบายวิธีการทำงานของ Queue

4 lines
55.

จงอธิบายวิธีการทำงานของ Tree

4 lines