Docsity

EGR 1400 - Computer Programming Study Guide (Version 2), Exams of Programming Languages

Toggle sidebar
bg1
EGR 1400 Study Exam 1 (2025/2026) |Verified
Questions and Correct Answers | A+ Graded
control structure - ✔✔ANSW✔✔..A logical design that controls the order in which statements
execute.
sequence structure - ✔✔ANSW✔✔..A set of statements that execute in the order that they
appear.
decision structure - ✔✔ANSW✔✔..Execute statements only under certain circumstances.
if-else - ✔✔ANSW✔✔..Will execute one block of statement if its Boolean expression is true or
another block if its Boolean expression is false.
AND - ✔✔ANSW✔✔..&&
OR - ✔✔ANSW✔✔..||
NOT - ✔✔ANSW✔✔..!
DO NOT COPY
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download EGR 1400 - Computer Programming Study Guide (Version 2) and more Exams Programming Languages in PDF only on Docsity!

EGR 1400 Study Exam 1 (2025/2026) |Verified

Questions and Correct Answers | A+ Graded

control structure - ✔✔ANSW✔✔..A logical design that controls the order in which statements execute. sequence structure - ✔✔ANSW✔✔..A set of statements that execute in the order that they appear. decision structure - ✔✔ANSW✔✔..Execute statements only under certain circumstances. if-else - ✔✔ANSW✔✔..Will execute one block of statement if its Boolean expression is true or another block if its Boolean expression is false. AND - ✔✔ANSW✔✔..&& OR - ✔✔ANSW✔✔..|| NOT - ✔✔ANSW✔✔..!

DO NOT COPY

AND operator - ✔✔ANSW✔✔..Both subexpression must be true for the compound expression to be true. OR operator - ✔✔ANSW✔✔..One or both subexpression must be true for the compound expression to be true. NOT operator - ✔✔ANSW✔✔..It negates (reverses) the value to its opposite one. < - ✔✔ANSW✔✔..Less than > - ✔✔ANSW✔✔..Greater than >= - ✔✔ANSW✔✔..Greater than or equal to <= - ✔✔ANSW✔✔..Less than or equal to == - ✔✔ANSW✔✔..equal to != - ✔✔ANSW✔✔..not equal to flag - ✔✔ANSW✔✔..A variable that signals when some condition exists in the program String.Compare - ✔✔ANSW✔✔..Compares two strings

DO NOT COPY

SelectedIndex - ✔✔ANSW✔✔..Gets or sets the zero-based index of the currently selected item in a ListBox. Items.Add - ✔✔ANSW✔✔..Allows you to add an item to the ListBox control. Items.Clear - ✔✔ANSW✔✔..Can erase all the items in the Items property. count - ✔✔ANSW✔✔..Reports the number of items stored in the ListBox. while loop - ✔✔ANSW✔✔..Causes a statement or set of statements to repeat as long as a Boolean expression is true. It tests its condition before performing an iteration. It is necessary to declare a counter variable with initial value. iteration - ✔✔ANSW✔✔..Each time the loop executes its statement or statements. while clause - ✔✔ANSW✔✔..The first line of a while loop infinite loop - ✔✔ANSW✔✔..A loop that will repeat until the program is interrupted. ++ - ✔✔ANSW✔✔..Increment -- - ✔✔ANSW✔✔..Decrement programmers - ✔✔ANSW✔✔..They are people with the training and skills necessary to design, create, and test programs. hardware - ✔✔ANSW✔✔..Refers to all physical devices

DO NOT COPY

central processing unit - ✔✔ANSW✔✔..The part of the computer that actually runs programs. It is the most important part of the computer and are microprocessor. main memory - ✔✔ANSW✔✔..The computer's work area. It is commonly known as RAM, and they are volatile types of memory. Meaning when the computer is powered off, the contents in the RAM are erased. Postfix mode - ✔✔ANSW✔✔..To place the ++ or -- operators after their operands. Prefix mode - ✔✔ANSW✔✔..To place the ++ or -- operators before their operands. for loop - ✔✔ANSW✔✔..Designed for situations requiring a counter variable to control the number of times that a loop iterates. initialization - ✔✔ANSW✔✔..A one-time expression that defines the initial value of the counter. test - ✔✔ANSW✔✔..A Boolean expression to be tested. If true, the loop iterates. update - ✔✔ANSW✔✔..Increase or decrease the value of the counter. do-while loop - ✔✔ANSW✔✔..A posttest loop, which means it performs an iteration before testing its Boolean expression. text file - ✔✔ANSW✔✔..Contains data that has been encoded as test using scheme such as Unicode.

DO NOT COPY

showDialog - ✔✔ANSW✔✔..Returns a value that indicates which button the user clicks to dismiss the dialog box. Filename - ✔✔ANSW✔✔..When the user selects a file with the Open dialog box, the file's path and filename are stored. load - ✔✔ANSW✔✔..Occurs when when running an application, the application's form is loaded into the memory. Any code you write inside the Load event will execute when the form is launched. program - ✔✔ANSW✔✔..A set of instructions that a computer follows to perform a task. Sequence of instructions. Can also be called a project, application, or a solution. secondary storage devices - ✔✔ANSW✔✔..Devices that can hold data for long periods of time, even when the power is off. It is where important data and system files are stored. Examples include disk drives, solid state drives. DVD-ROMs, CD-ROMs, USB drives and SD memory cards. input devices - ✔✔ANSW✔✔..Input is any data the computer collects from people and devices. Devices that collect the data and send them to the computer. Examples include; touch screens, keyboards, mouses, scanners, microphones, and digital cameras. output devices - ✔✔ANSW✔✔..Output is any data the computer produces for people or devices. The device that generates output for a computer is called an output device. Examples include: screens, speakers, and printers. system software - ✔✔ANSW✔✔..Programs that control and manage the basic operations of a computer.

DO NOT COPY

application software - ✔✔ANSW✔✔..Programs that perform special tasks bytes - ✔✔ANSW✔✔..Eight bits make a byte. Byte's are tiny storage locations where a computer stores its memory. bit - ✔✔ANSW✔✔..All data stored in a computer is converted to sequence of 0s and 1s; each sequence is called a bit. Combinations of bits are used to represent characters. digital - ✔✔ANSW✔✔..Refers to anything that can only have two possible values. Digital data is the data that is stored in binary. Digital devices are devices that work with binary data. One example is a computer. "fetch-decode-execute" cycle - ✔✔ANSW✔✔..Fetch: Reads instructions from memory. Decode: Decodes the instructions that were just read to determine how to perform operations. Execute: Actually performs the operations. machine languages - ✔✔ANSW✔✔..sequences of 1s and 0s assembly languages - ✔✔ANSW✔✔..use short words known as mnemonics to write the program. It must be translated by assembler. It is still considered lowlevel languages. high-level languages - ✔✔ANSW✔✔..More human readable languages that allow programmers to create programs without knowing how CPU works. They use keywords that have special meanings and cannot be used for any purpose other than to write programs. Modern languages are high-level. operators - ✔✔ANSW✔✔..Keywords that represent special program functions such as addition, subtraction, and multiplication.

DO NOT COPY

.NET Framework - ✔✔ANSW✔✔..A collection of classes and other codes that can be used to create programs for Windows operating system. C# is a language supported by the framework, controls are defined by specialized classes provided by the framework. You can also write your own class to perform a special task. programming development cycle - ✔✔ANSW✔✔..The process of creating a program. Six phases: Understand the problem and the program's purpose, design the GUI, design the program's logic, write the code, correct syntax errors, test the program and correct logic errors. Algorithm - ✔✔ANSW✔✔..A step-by-step series of instructions for solving a problem. flow chart - ✔✔ANSW✔✔..Graphically depict the logical steps to carry out a task and show how the steps relate to each other. pseudocode - ✔✔ANSW✔✔..Uses English-like phrases with some high-level Computer Programming Language terms to outline the task. namespace - ✔✔ANSW✔✔..A container that holds classes class - ✔✔ANSW✔✔..A container that holds methods. method - ✔✔ANSW✔✔..a group of one or more programming statements that perform some operations Program.cs file - ✔✔ANSW✔✔..Contains the application's start-up code to be executed when the application runs.

DO NOT COPY

Form1.cs - ✔✔ANSW✔✔..Contains code that is associated with the Form1 form. event - ✔✔ANSW✔✔..A user's actions. Examples: mouse clicking, key pressing, etc. message box - ✔✔ANSW✔✔..Displays a message label control - ✔✔ANSW✔✔..Displays text on a form and can be used to display unchanging text or program output. IntelliSense - ✔✔ANSW✔✔..Provides automatic code completion as you write programming statements. It provides an array of options that make language references easily accessible. picture box - ✔✔ANSW✔✔..Displays a graphic image on a form. variable name - ✔✔ANSW✔✔..Identifies a variable. Always choose a meaningful name for variables. The first character must be a letter or an underscore. The name cannot contain spaces. Do not use C# keywords or reserved words. string - ✔✔ANSW✔✔..A combination of characters. The value of a string variable is assigned on the right of the = operators surrounded by a pair of double quotes. concatenation - ✔✔ANSW✔✔..The appending of one string to the end of another string. C# uses the + operator for concatenation. Concatenation can happen between a string and another data type. comments - ✔✔ANSW✔✔..Brief notes that are placed in a program's source code to explain how parts of the program work.

DO NOT COPY

% - ✔✔ANSW✔✔..Modulus: divides one number by another and gives the remainder. ToString - ✔✔ANSW✔✔..Can optionally format a number to appear in a specific way. exception - ✔✔ANSW✔✔..An unexpected error that happens while a program is running. If it is not handled by the program, the program will abruptly halt. exception handlers - ✔✔ANSW✔✔..Codes that respond to exceptions. try block - ✔✔ANSW✔✔..Where statements that could have an exception are placed. catch block - ✔✔ANSW✔✔..Where statements respond to the exception when it happens are placed. number constant - ✔✔ANSW✔✔..A name that represents a value that cannot be changed during the program's execution. field - ✔✔ANSW✔✔..A variable that is declared at the class level. It is declared inside the class, but not inside of any method. It is a special type of variable and its scope is the entire class. TabIndex - ✔✔ANSW✔✔..Contains a numeric value indicating the control's position in the tab order. tab order - ✔✔ANSW✔✔..The order in which controls receive the focus. focus - ✔✔ANSW✔✔..Means that a control receives the user's keyboard input.

DO NOT COPY

group box - ✔✔ANSW✔✔..a control that is a container with a thin border and an optional title that can hold other controls. logic error - ✔✔ANSW✔✔..A mistake that does not prevent an application from running, but causes the application to produce incorrect results. breakpoint - ✔✔ANSW✔✔..A line that is selected in source code. break mode - ✔✔ANSW✔✔..The application pauses and enters breakmode when it is running and reaches a breakpoint. autos window - ✔✔ANSW✔✔..Displays a list of the variables appearing in the current statement, the three statements before, and the three statements after the current statement. The current value and the data type of each variable are also displayed. locals window - ✔✔ANSW✔✔..Displays a list of all the variables in the current procedure. The current value and the data type of each variable are also displayed. watch window - ✔✔ANSW✔✔..Allows you to add the names of variables you want to watch. This window displays only the variables you have added. single-step - ✔✔ANSW✔✔..The application's statements execute one at a time, under your control. This process allows you to identify the lines or lines of code causing the error.

DO NOT COPY