NEW
Font size
WorksheetsBinding
Total questions: 11
Worksheet time: 4mins
ข้อใดไม่สามารถใช้ตั้งชื่อตัวแปรในภาษา Python ได้
last_updated
_temp
ผลบวก
continue
ข้อใดเป็นการตัวชื่อแบบ Camel Case
last_name
lastName
last-name
LastName
ข้อใดเป็นชื่อตัวแปร/ชื่อฟังก์ชันใน Python ที่ถูกต้องตาม PEP 8 – Style Guide for Python Code
reverse_name
(Snake case)
ReverseName
(Pascal case)
reverseName
(Camel case)
reverse-name
(Kebab case)
ข้อใดจับคู่ Binding time ไม่ถูกต้อง
* คือ operator ในการคูณ : Language design time
ชนิดข้อมูลของตัวแปรใน Java : Compile time
ค่าของตัวแปร local ในฟังก์ชันภาษา C: Link time
float ใช้พื้นที่ 4 ไบต์: Language implementation time
ข้อใดเป็น dynamic binding ในภาษา C (เกิดขึ้น ณ ตอน runtime)
int x;
x = 6;
static int x = 5;
int x จองพื้นที่ในหน่วยความจำ 4 ไบต์
ข้อใดกล่าวถูกต้อง
ภาษา Java เป็น Dynamic type binding
ภาษา Python เป็น Static type binding
ภาษา Java ประกาศตัวแปรแบบ explicit declaration
ภาษา C ประกาศตัวแปรแบบ implicit declaration
ข้อใดพื้นที่ในหน่วยความจำสำหรับจัดเก็บ (storage allocation)
static, frame, type
stack, static, heap
local, global
explicit storage, implicit storage
ตัวแปรประเภทใดที่จัดในพื้นที่ stack
local variable
global variable
static local variable
constant
ข้อใดกล่าวถูกต้องเกี่ยวกับพื้นที่จัดเก็บ (storage binding)
static เป็นการจองพื้นที่ไว้ชั่วคราว สำหรับตัวแปร local
stack เป็นการจองพื้นที่ไว้ชั่วคราว สำหรับตัวแปร global
heap เหมาะสำหรับจัดเก็บข้อมูลที่เพิ่มลดขนาดได้
stack และ heap มีลักษณะการจัดเก็บแบบ LIFO เหมือนกัน
ข้อใดกล่าวถูกต้องเกี่ยวกับ strong typing และ type checking
ช่วยตรวจสอบการอ้างถึงตัวแปรนอกขอบเขต
ดักจับคำสั่งที่จะเกิด type error เมื่อรันโปรแกรม
ช่วยตรวจสอบขนาดของพื้นที่จัดเก็บข้อมูล
คำสั่งใดเป็นการกำหนดค่าคงที่ในภาษา C
const double PI = 3.14
final double PI = 3.14
constant double PI = 3.14
finally double PI = 3.14
