• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 29 pages
Exam (elaborations)

BSIT 5 – Programming and Application Development 9

Document preview thumbnail
Preview 3 out of 29 pages

BSIT 5 – Programming and Application Development 9

Content preview

1. What is the default value of a variable of type int in Java?

A. 0

B. null

C. 1

D. undefined

Answer: A

Rationale: The default value of an int in Java is 0.




2. What does the __init__ method do in Python classes?

A. Initializes the class

B. Initializes the object

C. Calls another function

D. Returns a value

Answer: B

Rationale: The __init__ method is the constructor in Python, and it is called when

an object is created to initialize its attributes.

,3. Which function is used to read input from the user in Python?

A. input()

B. read()

C. scan()

D. get()

Answer: A

Rationale: The input() function is used in Python to read input from the user.




4. Which of the following is a type of sorting algorithm?

A. Bubble Sort

B. Linked List

C. Hash Map

D. Set

Answer: A

Rationale: Bubble Sort is a well-known sorting algorithm used to order elements in

a list or array.

, 5. What is the function of an API (Application Programming Interface)?

A. It allows software applications to communicate with each other.

B. It stores data for applications.

C. It is used to create graphical interfaces.

D. It compiles programs.

Answer: A

Rationale: An API allows different software applications to communicate with

each other, providing a set of protocols and tools for building software.




6. In Java, what is the default value of a boolean variable?

A. True

B. False

C. Null

D. 0

Answer: B

Rationale: In Java, the default value of a boolean variable is false.

Document information

Uploaded on
March 17, 2025
Number of pages
29
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
douglasmugwe82
5.0
(1)
Sold
2
Followers
0
Items
4215
Last sold
1 year ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions