Software development Flashcards
What are Variables in Programming?
Variables are named storage locations in memory that can hold different values throughout the execution of a program.
What are the Main Types of Data?
Numeric (Integer, Real), Character (Single characters, Strings), Logical (Boolean: True/False).
What is the Difference Between Variables and Constants?
Variables can change value during program execution, while constants cannot.
How Do You Name Variables and Constants?
Names must start with a letter or underscore, cannot contain spaces, and can include letters, digits, and special characters.
What are Arithmetic Operators in Programming?
(Addition), - (Subtraction), * (Multiplication), / (Division), % (Modulus).
What is the Purpose of Logical Operators?
To perform logical operations, returning TRUE or FALSE based on the evaluation of conditions.
What are the Three Main Control Constructs in Programming?
Sequence, Selection, Iteration.
What is Structured Programming?
A programming paradigm aimed at improving clarity, quality, and development time by using subroutines, block structures, and for and while loops.
How Do You Implement Loop Structures?
Using “for” for count-controlled loops, “while” and “do-while” for condition-controlled loops.
What is the Significance of Functions in Programming?
Functions allow for code reuse, modular programming, and simplified code.
What is the Sequence control structure in programming?
Sequence is the default control structure that executes code statements one after another in the order they are written. It’s the linear progression of tasks, ensuring each statement is run from top to bottom without any conditions or loops altering the flow.
What is the Selection control structure in programming?
Selection, also known as decision-making, involves choosing between two or more paths in a program based on conditions. It is implemented using if-else statements or switch cases, allowing the program to execute different blocks of code based on specific conditions.
What is the Iteration control structure in programming?
Iteration, or looping, repeats a block of code multiple times until a specified condition is met. Common iteration structures include for loops, while loops, and do-while loops. They are used to perform repetitive tasks efficiently within a program.
What is a function in programming?
A function is a reusable block of code designed to perform a specific task. Functions are defined by a unique name and can be called from other parts of a program. They can accept inputs (parameters), perform operations, and return an output (result).
What does parameter passing mean in the context of functions?
Parameter passing refers to the process of providing inputs to a function when it is called. These inputs, known as parameters or arguments, are used by the function to perform its task. Parameters can be passed by value, where a copy of the data is used, or by reference, where the actual data is used, allowing the function to modify the original value.