1. Which of the following is the most suitable definition of a function in
programming?
A. A function is a block of code that performs a specific task.
B. A function is used to store data.
C. A function is a sequence of statements that produce output.
D. A function is a method for creating variables.
Answer: A
Rationale: A function is a block of code that performs a specific task and can be
reused throughout the program.
2. What does CSS stand for?
A. Creative Style Sheets
B. Cascading Style Sheets
C. Computer Style Sheets
D. Color Style Sheets
Answer: B
,Rationale: CSS stands for Cascading Style Sheets, used for styling HTML
elements.
3. In JavaScript, which of the following is used to declare a constant?
A. const
B. constant
C. let
D. var
Answer: A
Rationale: The const keyword is used in JavaScript to declare a constant that
cannot be reassigned.
4. Which of the following is true about JavaScript?
A. JavaScript is a server-side language
B. JavaScript is used for database management
C. JavaScript can be used to manipulate HTML and CSS
D. JavaScript is used only for web servers
Answer: C
, Rationale: JavaScript can be used to manipulate HTML and CSS, enabling
dynamic web pages.
5. 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.
6. Which of the following keywords is used to declare a method in Java?
A. method
B. function
C. void
D. public
Answer: C
programming?
A. A function is a block of code that performs a specific task.
B. A function is used to store data.
C. A function is a sequence of statements that produce output.
D. A function is a method for creating variables.
Answer: A
Rationale: A function is a block of code that performs a specific task and can be
reused throughout the program.
2. What does CSS stand for?
A. Creative Style Sheets
B. Cascading Style Sheets
C. Computer Style Sheets
D. Color Style Sheets
Answer: B
,Rationale: CSS stands for Cascading Style Sheets, used for styling HTML
elements.
3. In JavaScript, which of the following is used to declare a constant?
A. const
B. constant
C. let
D. var
Answer: A
Rationale: The const keyword is used in JavaScript to declare a constant that
cannot be reassigned.
4. Which of the following is true about JavaScript?
A. JavaScript is a server-side language
B. JavaScript is used for database management
C. JavaScript can be used to manipulate HTML and CSS
D. JavaScript is used only for web servers
Answer: C
, Rationale: JavaScript can be used to manipulate HTML and CSS, enabling
dynamic web pages.
5. 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.
6. Which of the following keywords is used to declare a method in Java?
A. method
B. function
C. void
D. public
Answer: C