Call by Reference Vs Call by Value

Call by Reference Vs Call by Value

11th Grade

30 Qs

quiz-placeholder

Similar activities

Python_3P_Basics

Python_3P_Basics

11th Grade

31 Qs

SAS 1 Informatika 7

SAS 1 Informatika 7

7th Grade - University

25 Qs

Pemahaman Jaringan Komputer

Pemahaman Jaringan Komputer

8th Grade - University

25 Qs

Quiz Dasar HTML

Quiz Dasar HTML

11th Grade

30 Qs

PSTS PPLDB

PSTS PPLDB

11th Grade

25 Qs

SOAL INFORMATIKA KELAS XI

SOAL INFORMATIKA KELAS XI

11th Grade

30 Qs

3 EOT

3 EOT

11th Grade

30 Qs

PTS TIK 8D

PTS TIK 8D

2nd Grade - University

25 Qs

Call by Reference Vs Call by Value

Call by Reference Vs Call by Value

Assessment

Quiz

Information Technology (IT)

11th Grade

Hard

Created by

Krishna Sekhar

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How does Python pass primitive data types to a function?
By reference
By value
By pointer
By memory address

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when an integer is passed to a function?
The original value can be changed
The value remains unchanged
The value is deleted
The value is multiplied

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does "pass by reference" mean in Python?
Copying the entire data
Passing a reference to mutable data types
Passing data by memory location
Deleting the original data

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data types are passed by value in Python?
Lists and dictionaries
Tuples and strings
Integers and booleans
Sets and lists

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the .copy() method?
To delete a list
To create a new copy of a list
To modify a list
To sort a list

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you check if two variables reference the same data?
Using '=='
Using 'is' operator
Using 'type()'
Using 'id()'

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'id()' function do in Python?
Deletes a variable
Generates a random number
Provides a unique identifier for an object
Counts list elements

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?