CS50, lecture 2: Arrays Questions And Answers.
CS50, lecture 2: Arrays Questions And Answers. command line argument an input to a program on the command-line as extra words after the program's name in the command itself (run in terminal) Preprocessing Compiling step 1 of 4; a text substitution tool that instructs the compiler to do required __________ before the actual compilation; commands start with hash symbol (#) Compiling Compiling step 2 of 4; takes our source code (e.g. human-written code in C), and converts it to another type of source code called assembly code. assembling Compiling step 3 of 4; takes the assembly code and translates it to instructions in binary. The instructions in binary are called machine code, which a computer's CPU can run directly. Assembly Code These instructions are lower-level and is closer to the binary instructions that a computer's processor can directly understand. They generally operate on bytes themselves, as opposed to abstractions like variable names. Linking Compiling step 4 of 4; combines previously compiled versions of libraries, that are included in the main program, with the binary of the program; We end up with one binary file, that is the combined (program's and included libraries') machine code. bugs mistakes or problems in programs that cause them to behave differently than intended Debugging Finding and fixing problems in an algorithm or program. Debuggers programs that will run programs step-by-step and let us look at variables and other information while the program is running. Breakpoint indicator for a line of code where the debugger should pause the program. call stack a special type of stack used to store information about active subroutines and functions within a program step into debugging command; brings us into the function called on that line step over Debugging command; executes each statement in the main procedure but does not show statements in called procedures. step out debugging command; duck debugger debugging technique, where we explain what we're trying to do to a rubber duck, and oftentimes we'll realize our own mistake in logic or implementation as we're explaining it. data type (type) All values in a programming language have a ________ - such as Integer, Boolean, or String - that dictates how the computer will interpret it, what values it can take, and what operations may be performed upon it. For example 7+5 is interpreted differently from "7"+"5" data types and space bool == 1 byte char == 1 byte double == 8 bytes float == 4 bytes int == 4 bytes long == 8 bytes string == ? bytes RAM (Random Access Memory)
Document information
- Uploaded on
- May 26, 2024
- Number of pages
- 5
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers