1) What does "pass by value" mean in programming? a) The function is given the actual value stored in a variable. b) The function is given a reference to the actual variable. c) The function can directly modify the value of the variable. d) The function creates a new variable inside its scope. 2) In "pass by reference," a function receives: a) A new copy of the variable. b) The memory address of the variable. c) A constant value. d) An encrypted version of the variable. 3) Which of the following is true about "pass by value"? a) It allows the function to modify the original variable. b) It is more memory efficient when dealing with large objects. c) It ensures that the original variable remains unchanged. d) It is the default method in JavaScript for all types of variables. 4) In which scenario might "pass by reference" be more efficient than "pass by value"? a) When the function needs to modify an input variable. b) When dealing with small, simple variables. c) When maximum security and data protection is required. d) When the programming language does not support pointers or references. 5) Which of the following programming languages uses "pass by value" for primitive types by default? a) Python b) C++ c) JavaScript d) All of the above
0%
Passing by Value and Reference
แชร์
แชร์
แชร์
โดย
Dcaltutoring
Y13
Computing
แก้ไขเนื้อหา
สั่งพิมพ์
ฝัง
เพิ่มเติม
กำหนด
ลีดเดอร์บอร์ด
แสดงเพิ่มขึ้น
แสดงน้อยลง
ลีดเดอร์บอร์ดนี้ตอนนี้เป็นส่วนตัว คลิก
แชร์
เพื่อทำให้เป็นสาธารณะ
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานโดยเจ้าของทรัพยากร
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานเนื่องจากตัวเลือกของคุณแตกต่างสำหรับเจ้าของทรัพยากร
แปลงกลับตัวเลือก
แบบทดสอบ
เป็นแม่แบบแบบเปิดที่ไม่ได้สร้างคะแนนสำหรับลีดเดอร์บอร์ด
ต้องลงชื่อเข้าใช้
สไตล์ภาพ
แบบ อักษร
ต้องสมัครสมาชิก
ตัวเลือก
สลับแม่แบบ
แสดงทั้งหมด
รูปแบบเพิ่มเติมจะปรากฏเมื่อคุณเล่นกิจกรรม
เปิดผลลัพธ์
คัดลอกลิงค์
คิวอาร์โค้ด
ลบ
คืนค่าการบันทึกอัตโนมัติ:
ใช่ไหม