Cuestionario: Fundamentals of Programming and Software Development — 9 preguntas

Preguntas y respuestas detalladas

1. What is a function in programming?

A reusable piece of code that is part of an object and operates on its data
A sequence of instructions that performs a task without accepting input parameters
A block of code that performs a specific task without returning a value
A block of code that performs a specific task and returns a value

A block of code that performs a specific task and returns a value

Explicación

A function is a block of code designed to perform a specific task, accept input parameters, and return a value, as explicitly defined in the course content.

2. Which control structure is described as a statement that selects one of many code blocks to execute based on the value of an expression, and was specifically cited as being explained in 2017?

Loops
Switch case
Conditional statements
Branching

Switch case

Explicación

The 'Switch case' control statement is explicitly mentioned in the content as a structure that selects among many code blocks based on an expression's value, with a citation from 2017, making it the correct answer.

3. What is the primary role of variables in programming?

To perform calculations without storing data
To serve as named storage locations for data that can change during program execution
To execute a sequence of instructions in a program
To define the structure of a program's user interface

To serve as named storage locations for data that can change during program execution

Explicación

Variables act as named storage locations that hold data which can change during program execution, enabling programs to manipulate and process data dynamically.

4. When was the concept of functions and procedures formally established or published in the context of programming?

1968
1978
1986
1972

1968

Explicación

The concept of functions and procedures was formally established and gained widespread recognition with the publication of influential work on structured programming by Edsger Dijkstra in 1968, which emphasized modularity and the use of functions and procedures.

5. How do a class and an object differ in object-oriented programming?

An object defines the structure of a class, while a class is an object in memory.
A class is a blueprint for creating objects, while an object is an instance of a class.
A class is an object created at runtime, while an object is a static template.
A class and an object are identical; the terms are interchangeable.

A class is a blueprint for creating objects, while an object is an instance of a class.

Explicación

A class serves as a blueprint or template for creating objects, which are specific instances of that class. This fundamental distinction is key to understanding object-oriented programming.

6. Who is credited with proposing the concept of the stack data structure?

Dennis Ritchie
Kernighan and Ritchie
Edsger Dijkstra
Alan Turing

Edsger Dijkstra

Explicación

Edsger Dijkstra is credited with formalizing the concept of the stack data structure, which is fundamental in programming for managing function calls and recursion.

7. What is a common consequence of improper file handling in programming?

Data corruption or loss due to not closing files properly
Increased program speed and efficiency
Improved readability of code
Enhanced security of stored data

Data corruption or loss due to not closing files properly

Explicación

Improper file handling, such as failing to close files after operations, can lead to data corruption or loss because data may not be written properly or resources may not be released, causing errors and unreliable data storage.

8. How can a programmer effectively use breakpoints during debugging to identify errors in their code?

Use automated testing tools to generate reports about code errors.
Run the program multiple times with different inputs to see when errors occur.
Write additional print statements throughout the code to track variable values.
Set breakpoints at suspected error locations and step through code to observe variable states.

Set breakpoints at suspected error locations and step through code to observe variable states.

Explicación

Setting breakpoints at suspected error locations allows the programmer to pause execution and step through the code, observing variable states and program flow, which helps identify the source of errors efficiently.

9. What is a key feature of the Software Development Life Cycle?

It is a systematic, phased approach guiding software development.
It involves only coding and testing phases without planning.
It focuses solely on maintenance after deployment.
It is an unstructured process that develops software randomly.

It is a systematic, phased approach guiding software development.

Explicación

The key feature of SDLC is that it is a systematic, phased approach that guides the entire software development process from requirements to maintenance, ensuring organized and efficient development.

Repasa con tarjetas de memoria

Memoriza las respuestas con 18 tarjetas de memoria sobre Fundamentals of Programming and Software Development.

Algorithm — definition?

A step-by-step problem-solving procedure.

Syntax — role?

Defines language structure and rules.

Programming Language — purpose?

Communicates instructions to a computer.

Ver tarjetas de memoria →

Estudia la hoja de repaso

Lee la hoja de repaso completa sobre Fundamentals of Programming and Software Development.

Ver hoja de repaso →

Similar courses

Crea tus propios cuestionarios

Importa tu curso y la IA genera cuestionarios con correcciones en 30 segundos.

Generador de cuestionarios