Skip to content
Pass Any WGU OA Exam Now & Pay After You Pass. Contact Us!
  1. Home
  2. WGU Exams
  3. WGU D278
  4. Set 5
WGU D278 · Scripting and Programming Foundations

WGU D278 Practice Questions – Set 5

50 multiple-choice questions with answers and detailed explanations. Untimed — choose an answer to check it instantly.

Question 1 of 50

What is a function in programming?

Question 2 of 50

What is a function parameter?

Question 3 of 50

What is a return value?

Question 4 of 50

What happens when a function has no explicit return statement?

Question 5 of 50

What is the main benefit of decomposing a program into functions?

Question 6 of 50

What is recursion?

Question 7 of 50

What is essential to prevent infinite recursion?

Question 8 of 50

What is an array?

Question 9 of 50

How do you access the third element of an array named data using zero-based indexing?

Question 10 of 50

What is an array index out of bounds error?

Question 11 of 50

What is a two-dimensional array commonly used to represent?

Question 12 of 50

How do you typically iterate through every element of an array?

Question 13 of 50

What is a list or dynamic array?

Question 14 of 50

What is the length property of a string?

Question 15 of 50

What does a substring operation do?

Question 16 of 50

Why should strings be compared with a comparison function rather than reference equality in some languages?

Question 17 of 50

What is string immutability?

Question 18 of 50

What is a linear search?

Question 19 of 50

What is a prerequisite for using binary search?

Question 20 of 50

Why is binary search more efficient than linear search on large sorted data?

Question 21 of 50

What does a sorting algorithm do?

Question 22 of 50

What is the basic idea of bubble sort?

Question 23 of 50

What does 'time complexity' describe?

Question 24 of 50

What does O(n) time complexity mean?

Question 25 of 50

What does O(1) time complexity indicate?

Question 26 of 50

What is a dictionary or hash map?

Question 27 of 50

What is exception handling?

Question 28 of 50

What is the purpose of a try-catch block?

Question 29 of 50

What is the purpose of a finally block?

Question 30 of 50

What is a common cause of a divide-by-zero error?

Question 31 of 50

What is file input and output (I/O)?

Question 32 of 50

Why should files be closed after use?

Question 33 of 50

What is a code library or module?

Question 34 of 50

What is the benefit of using existing libraries?

Question 35 of 50

What is version control used for?

Question 36 of 50

What is a commit in version control?

Question 37 of 50

What is the purpose of code testing?

Question 38 of 50

What is a unit test?

Question 39 of 50

What is a test case for a boundary condition?

Question 40 of 50

What is refactoring?

Question 41 of 50

Why is code readability important?

Question 42 of 50

What is the DRY principle in programming?

Question 43 of 50

What is the purpose of indentation in code?

Question 44 of 50

What is a code review?

Question 45 of 50

What is an integrated development environment (IDE)?

Question 46 of 50

What is the primary purpose of program documentation?

Question 47 of 50

What is modular programming?

Question 48 of 50

What is the software development life cycle (SDLC)?

Question 49 of 50

Why are requirements gathered before coding begins?

Question 50 of 50

What is the value of writing a program in small, testable increments?

Set 5 complete

You scored 0%

0 correct out of 0 answered (50 questions in this set).

Struggling with WGU D278?

If this exam is giving you a hard time, let us be your helping hand. Contact us, and we'll provide the assistance you need to pass and move forward.

Chat Now