wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Program66-3

Total questions: 30

Worksheet time: 3hrs 31mins

Name
Class
Date
1.

นามสกุล ของไฟล์ source code คือ

The extension of the source code file is

a)

.c / .cpp

b)

.obj

c)

.exe

d)

.h

2.

ข้อใดไม่ใช่ โครงสร้างโปรแกรมภาษาซี

Which is not a C program structure?

a)

ส่วนหัวของโปรแกรม

Program header

b)

ส่วนฟังก์ชั่นหลัก

The main function

c)

ส่วนรายละเอียดของโปรแกรม
Program details section

d)

ส่วนคอมไพเลอร์

Compiler section

3.

ส่วนใดของโปรแกรม เริ่มทำงานก่อน
What part of the program? Start working first.

a)

ส่วนหัวของโปรแกรม

Program header

b)

ส่วนฟังก์ชั่นหลัก

The main function

c)

ส่วนรายละเอียดของโปรแกรม

Program details section

d)

ส่วนคอมไพเลอร์

Compiler section

4.

ส่วนใดของโปรแกรม คือส่วนทีนักเรียนต้องเขียนโค๊ดลงไป

What part of the program? This is the part where students have to write code.

a)

ส่วนหัวของโปรแกรม

Program header

b)

ส่วนฟังก์ชั่นหลัก

The main function

c)

ส่วนรายละเอียดของโปรแกรม

Program details section

d)

ส่วนคอมไพเลอร์

Compiler section

5.

ส่วนหัวของโปรแกรม มีนามสกุลใด

What extension does the program header have?

a)
.c
b)
.exe
c)
.h
d)
.obj
6.

ชื่อใดไม่ผิดกฏการตั้งชื่อ

Which name doesn't violate naming rules?

a)
int
b)
tea_001
c)
#tea001
d)
tea  001
7.

ในภาษาซี หากตั้งชื่อตัวแปรดังนี้

(In C language, if you name a variable like this:)
1. ant
2. Ant
3. aNt
4. anT
ข้อใดถูกต้อง (With one is correct )

a)

ทั้ง 4 ตัว เป็นตัวแปรตัวเดียวกัน

All 4 are the same variable.

b)

ทั้ง 4 ตัว เป็นตัวแปรคนละตัว

All 4 are different variables.

c)

ข้อ 1, 2 เป็นตัวแปรตัวเดียวกัน

Items 1 and 2 are the same variable.

d)

ไม่มีข้อถูก

There is no correct answer.

8.

ภาษาเครื่องมีลักษณะใด

What are the characteristics of machine language?

a)

เลขฐานสอง

binary number

b)

สัญลักษณ์

symbol

c)

ภาษามนุษย์

human language

d)

ภาษาธรรมชาติ

natural language

9.

main() เป็น อะไร (what is main())

a)

process

b)

library

c)

function

d)

data

10.

นามสกุล ของไฟล์ ที่ได้หลังจากการ complie & run คือ

(The extension of the file obtained after complie & run is)

a)

.cpp / .exe

b)

.obj / .cpp

c)

.obj / .exe

d)

.h / .cpp

11.

ตัวเชื่อมเงื่อนไข "หรือ" คือข้อใด
What is the conditional connector "or"?

a)

||

b)

&&

c)

""

d)

#

12.

a+=2 มีค่าเท่ากับข้อใด
Which item is equal to a+=2

a)

a=a+2

b)

a=a+a

c)

a=a*a

d)

a=2

13.

ถ้ากำหนด (given)

int A = 5,B = 3;

B = A/2;

B มีค่าเท่าไหร่ ( B How much is it worth?)

a)

0

b)

2

c)

2.5

d)

3

14.

100 % 2 = ?

a)

50

b)

2

c)

1

d)

0

15.

จากรายละเอียดต่อไปนี้ “โปรแกรมตรวจสอบการลดราคาสินค้าของห้างสรรพสินค้าแห่งหนึ่ง โดยหากสินค้าดังกล่าวมีอายุการผลิตน้อยกว่า 1 ปี จะไม่ลดราคา แต่ถ้าผลิตตั้งแต่ 1 ปี แต่ไม่ถึง 3 ปี ลดราคา 30% แต่ถ้าผลิตมาแล้วตั้งแต่ 3 ปี ขึ้นไป ลดราคา 50%”
From the following details “A program to check product price reductions at a department store. If the product has been produced for less than 1 year, there will be no price reduction. But if it has been produced for more than 1 year but less than 3 years, the price will be reduced by 30%. But if it has been produced for 3 years or more, the price will be reduced by 50%.”


สิ่งใด ควรขอให้ผู้ใช้ป้อนเข้ามาสู่โปรแกรม มากที่สุด
What should the user be asked to enter into the program as much as possible?

a)

ราคาเต็มของสินค้าดังกล่าวก่อนลดราคา
The full price of the said product before discounts.

b)

อายุการผลิตของสินค้าดังกล่าว
Production life of the said product

c)

เปอร์เซ็นต์การลดราคาของสินค้าดังกล่าว

Percentage reduction of the price of said products

d)

ราคาของสินค้าดังกล่าวหลังลดราคาแล้ว

The price of the said product after discount.

16.

ภาษาระดับใดที่ทำความเข้าใจได้ง่าย มีลักษณะของการใช้คำสั่งเป็นภาษาอังกฤษซึ่งใกล้เคียงกับภาษามนุษย์มาก
What level of language is easy to understand? There are characteristics of using commands in English which are very close to human language.

a)

ภาษาระดับต่ำ

low level language

b)

ภาษาระดับกลาง

Intermediate language

c)

ภาษาระดับสูง

high level language

d)

ภาษาระดับสูงมาก

very high level language

17.

สัญลักษณ์ในภาพมีความหมายว่าอะไร ?
What do the symbols in the picture mean?

a)

กำหนดค่า หรือ ประมวลผล

Configure or process

b)

รับข้อมูลทางแป้นพิมพ์

Receive information via keyboard

c)

แสดงผลทางจอภาพ

Displayed on the screen

d)

เริ่มต้น

start

18.

สัญลักษณ์ในภาพมีความหมายว่าอะไร ?
What do the symbols in the picture mean?

a)

ตัดสินใจ

decision

b)

แสดงผลทางจอภาพ

Displayed on the screen

c)

แสดงผลทางเอกสาร

display on the document

d)

รับข้อมูลและแสดงผลข้อมูล

input and display data

19.

สัญลักษณ์ในภาพมีความหมายว่าอะไร ?

What do the symbols in the picture mean?

a)

รับข้อมูล

input data

b)

แสดงผลข้อมูล

display data

c)

การตัดสินใจ

decision

d)

รับข้อมูลหรือแสดงผลข้อมูล

input and display data

20.

คำสั่งใดใช้ในการแปลงข้อมูลจากตัวอักษรเป็นตัวเลข
Which command is used to convert data from letters to numbers?

a)

int()

b)

float()

c)

number()

d)

list()

21.

หากต้องการให้โปรแกรมทำงานแบบมีเงื่อนไขต้องใช้คำสั่งใด
If you want the program to run conditionally, what command should you use?

a)

if

b)

for

c)

while

d)

while True

22.

จากตัวอย่างรหัสลำลองต่อไปนี้ หาก z มีค่าเป็น 52 และ y มีค่าเป็น 18 ข้อใดคือผลลัพธ์ที่ถูกต้อง

In the following casual code example, if z is 52 and y is 18, which is the correct result?

z<y AND y>10z<y\ AND\ y>10  

a)

false

b)

true

c)

false and true

d)

true and false

23.

ข้อใดบอกความหมายของ ซอร์สโค้ด (Source code) ได้ถูกต้องที่สุด

Which statement most accurately describes the meaning of the source code?

a)

รหัสของสัญลักษณ์การเขียนโปรแกรม

Code of programming symbols

b)

ชุดของคำสั่งที่ผ่านการแปลภาษาแล้ว

A set of translated commands

c)

ชุดคำสั่งต่างๆของโปรแกรม

Various command sets of the program

d)

รูปแบบของคำสั่ง

Format of command

24.

ชนิดของตัวแปรกับรหัสควบคุมรูปแบบการแสดงผลของตัวแปรในข้อใดที่ไม่สอดคล้องกัน
The type of variable and the code controlling the display format of the variable are inconsistent.

a)

%c กับ octal

b)

%d กับ decimal

c)

%f กับ float

d)

%f กับ double

25.

ชนิดของตัวแปรชนิดใด เหมาะสมกับตัวแปร H= เกรดเฉลี่ย มากที่สุด

What type of variable? It is most appropriate for the variable H= GPA.

a)

float

b)

int

c)

char

d)

unsinged char

26.

ข้อผิดพลาดที่เกิดจากการทดสอบความถูกต้องของโปรแกรม จะพบการข้อผิดพลาด(error)ในข้อใด
Errors resulting from testing the correctness of the program. Where will the error (error) be found?

a)

Logic Errors

b)

Coding Errors

c)

Maintenance Error

d)

Integration Error

27.

ข้อใดไม่ใช่ภาษาโปรแกรม

Which is NOT a programming language?

a)

javaScript

b)

Python

c)

Microsoft

d)

Fortran

28.

The following figure is an example of simple flow chart.
Flow chart is used in _____________ phase.  

รูปต่อไปนี้เป็นตัวอย่างของผังงานอย่างง่าย

ผังงานอยู่ในระยะใดของระบบงาน _____________

a)

analysis

b)

design

c)

coding

d)

testing

29.

Which statement is NOT correct?
ข้อความใดไม่ถูกต้อง?

a)

Algorithm is a computer language that a computer understands.
อัลกอริทึมเป็นภาษาคอมพิวเตอร์ที่คอมพิวเตอร์เข้าใจ

b)

Algorithm has a set of instructions to follow.

อัลกอริทึมมีชุดคำสั่งให้ปฏิบัติตาม

c)

One of examples of algorithms is a cooking recipe.

ตัวอย่างหนึ่งของอัลกอริธึมคือสูตรการทำอาหาร

d)

To tell a computer to do something, a program must be written in a computer language.
หากต้องการบอกให้คอมพิวเตอร์ทำอะไรสักอย่าง โปรแกรมจะต้องเขียนด้วยภาษาคอมพิวเตอร์

30.

In this algorithm, on what line is iteration first used?

ในอัลกอริธึมนี้ การวนซ้ำใช้บรรทัดใดเป็นครั้งแรก

a)

3

b)

4

c)

5

d)

6