Introduction to C Programming
- 74Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
74 questions
- 1The programming language introduced in week one for more traditional programming is called_____.
Hint
This language is known for its efficiency and is a foundational language in computer science.
Answer
C
- 2Scratch was designed to make programming accessible and user-friendly, and to elucidate fundamental concepts like functions, conditionals, loops, and_____.
Hint
This concept allows you to store and manipulate data within a program, much like a container.
Answer
variables
- 3In Scratch, the 'when green flag clicked' orange puzzle piece is equivalent to a cryptic textual syntax in C, often related to the program's_____point.
Hint
This part of the code marks where the program begins its execution.
Answer
entry
- 4The purple block in Scratch, which represents an action or a verb, is conceptually equivalent to a_____in C.
Hint
This programming construct allows you to encapsulate a block of code to perform a specific task.
Answer
function
- 5The text-based code written by programmers in languages like C is referred to as_____code.
Hint
This is the human-readable form of a program before it is translated for the computer.
Answer
source
- 6Computers ultimately only understand zeros and ones, which is known as the_____system.
Hint
This numbering system is fundamental to how computers process and store data.
Answer
binary
- 7Patterns of bits are used by computers not only to represent numbers, letters, colors, and images, but also to represent fundamental_____like printing or playing things.
Hint
Think about the actions or operations that a computer can perform.
Answer
functionality
- 8The zeros and ones that computers understand are referred to as_____code.
Hint
This is the low-level, executable code directly understood by a computer's CPU.
Answer
machine
- 9A special program called a_____is used to translate source code written in a language like C into machine code.
Hint
This tool acts as a bridge, converting human-readable code into computer-executable instructions.
Answer
compiler
- 10The industry-standard tool used for CS50 problem sets, which is a cloud-based version, is called Visual Studio Code, or VS Code for_____.
Hint
This is an abbreviation for a common term.
Answer
short
- 11The cloud-based version of VS Code used for CS50 lives at the URL_____.
Hint
This is the specific web address for the CS50 programming environment.
Answer
cs50.dev
- 12VS Code automatically_____your code, colorizing it to draw attention to different ideas in the program.
Hint
This feature helps with readability by visually distinguishing different syntax elements.
Answer
highlights
- 13The more advanced interface used in VS Code, known as a command line interface, is presented in the form of a_____window.
Hint
This window allows users to interact with the computer by typing commands rather than clicking icons.
Answer
terminal
- 14The top-left panel in VS Code that visually displays files and folders is called the File_____.
Hint
This component allows for graphical navigation and management of a project's files.
Answer
Explorer
- 15CS50's built-in chat bot, accessible via a duck icon in the activity bar, is available to answer questions throughout the_____.
Hint
This resource provides assistance during your learning journey in CS50.
Answer
process
- 16A graphical user interface, abbreviated as GUI, involves elements like buttons, icons, and_____.
Hint
These are common interactive components found in most modern operating systems and applications.
Answer
menus
- 17The programming environment in CS50 is referred to as a_____user interface (GUI), while the terminal window represents a command line interface (CLI).
Hint
This type of interface relies on visual elements for user interaction.
Answer
graphical
- 18To create a new file in the CS50 environment, you type the word_____
codefollowed by theof the file you want to create.Hint
This command specifies what the new file will be called.
Answer
name
- 19By convention, when writing code in C, files are named with a dot_____file extension.
Hint
This suffix indicates that the file contains C language source code.
Answer
c
- 20In C programming, it's important to use lowercase letters and no_____in file names, as computers are not forgiving of such inconsistencies.
Hint
This common error can lead to issues with file paths and commands.
Answer
spaces
- 21The command_____
make hellorepresents the, which converts source code to machine code.Hint
This tool is responsible for transforming human-readable code into executable instructions.
Answer
compiler
- 22After compiling a C program, the third step to run it from the current folder is to type `_____hello`.
Hint
This prefix indicates that you want to execute a program located in the current directory.
Answer
./
- 23The command_____
lsis short for, and it shows you the files in your current folder.Hint
This command allows you to view the contents of a directory.
Answer
list
- 24When using a terminal window, the dollar sign_____
$at the beginning of a line is a convention indicating where you shouldyour commands.Hint
This symbol is a visual cue for the user's input area.
Answer
type
- 25Unlike_____
code,make, orls, programs that you write yourself need to be run with `` because they are not installed in the system for everyone.Hint
This prefix specifies the current directory when executing a program.
Answer
./
- 26In the context of C programming,_____
printfis a function that can format text in interesting ways, serving a similar purpose to Scratch'sblock.Hint
This Scratch block is used for displaying text on the screen.
Answer
say
- 27In C, when passing a string input to a function like_____
printf, you must surround everything inquotes.Hint
This type of quotation mark is used to delimit literal strings in C.
Answer
double
- 28The arcane detail_____
\nwithin a string in C is called ansequence, and it tells the computer to insert a new line.Hint
These special character combinations are used to represent non-printable characters or to alter the meaning of subsequent characters.
Answer
escape
- 29In C, to display a literal double quote within a string, you must_____it with a backslash, like
\".Hint
This technique prevents the character from being interpreted as a string delimiter.
Answer
escape
- 30The output of the_____
printffunction, which is something that happens visually on the screen, is referred to as aeffect.Hint
This term describes an action performed by a function that doesn't necessarily return a value, but rather causes a change in the program's state or environment.
Answer
side
- 31The file at the top of the C code, like_____
stdio.h, is called afile and contains functionality that came with the programming language.Hint
These files provide declarations for functions and variables that are available for use in a program.
Answer
header
- 32A_____is a collection of code that someone else wrote for you, which you access by including header files.
Hint
Think of this as a collection of pre-written functions and resources that can be used in your programs.
Answer
library
- 33The commonly made mistake of typing_____
studio.hinstead ofstdio.hhighlights the importance of precise spelling for the Standard/Output header file.Hint
This abbreviation refers to the basic operations for reading from and writing to standard devices.
Answer
Input
- 34The online documentation for C programming, which includes user-friendly versions of header files and functions, is found at_____.
Hint
This URL provides resources to understand how C functions and libraries work.
Answer
manual.cs50.io
- 35The documentation pages for C specifically are often referred to as manual pages, or_____pages for short.
Hint
This abbreviation is a common term for help files in Unix-like operating systems.
Answer
man
- 36In Scratch, the blue oval labeled 'answer' represents a_____value from a function, which is a value handed back for further use.
Hint
This is the outcome or result that a function provides back to the part of the program that called it.
Answer
return
- 37When a function returns a value in C, you need to store it in a_____on the left-hand side of the line of code.
Hint
This is a named storage location that can hold a value.
Answer
variable
- 38You must tell the computer what_____of variable it is, such as
stringfor text, because the computer doesn't inherently know if it's looking at numbers or characters.Hint
This classification defines the kind of data a variable can hold and the operations that can be performed on it.
Answer
type
- 39In C and many other languages, you must explicitly finish your thought at the end of a line of code with a_____.
Hint
This punctuation mark indicates the end of a statement.
Answer
semicolon
- 40To combine multiple inputs in a_____
printffunction, such as a string and a variable, you uselike%sfor string or%ifor integer.Hint
These special format specifiers act as markers for where values should be inserted into a formatted string.
Answer
placeholders
- 41The command_____
cdin the terminal is short for `change`, allowing you to navigate between folders.Hint
This term refers to a folder in a file system.
Answer
directory
- 42To make a copy of a file or folder, you use the command `_____
which is short forcopy`.Hint
This command duplicates files or directories.
Answer
cp
- 43The command_____
mkdiris short for `make`, and it is used to create a new folder.Hint
This command creates a new folder in the file system.
Answer
directory
- 44To move a file or folder from one place to another, or to simply rename it, you use the command `_____
, short formove`.Hint
This command can be used for both relocating and renaming files or directories.
Answer
mv
- 45The command_____
rmis short for ``, and it is used to delete a file.Hint
This command permanently deletes files or directories.
Answer
remove
- 46To specify the parent folder, like backing up from where you came, you use `_____` in terminal commands.
Hint
This shorthand represents the directory immediately above the current one.
Answer
..
- 47Typing_____
cdand nothing else in the terminal window willyou back to your original folder, no matter where you are.Hint
This shortcut quickly takes you to your home directory.
Answer
whisk
- 48In C, a_____
charrepresents a single, unlike astringwhich can be one or more characters.Hint
This data type stores a single letter, number, or symbol.
Answer
character
- 49When comparing a character in C, you must surround the character you're comparing against in_____quotes, like
'y'for yes.Hint
This type of quotation mark is specifically used for character literals in C.
Answer
single
- 50In C, to check if a condition is true or another condition is true, you use the logical `_____
operator, represented by two vertical bars||`.Hint
This operator evaluates to true if at least one of its operands is true.
Answer
or
- 51The logical `_____
operator in C, represented by two ampersands&&`, means that both conditions on its left and right must be true.Hint
This operator evaluates to true only if all of its operands are true.
Answer
and
- 52The multiplication operator in C is represented by a single_____symbol.
Hint
This symbol is commonly used in programming for multiplication.
Answer
- 53The `_____` keyword in C allows you to forcibly exit a loop (for, while, or do-while) early.
Hint
This statement is used to terminate the execution of the innermost loop or switch statement.
Answer
break
- 54The problem where an integer's value exceeds the maximum capacity of its allocated bits, causing it to wrap around to a negative or zero value, is called integer_____.
Hint
This occurs when a calculation produces a result that is too large to be stored in the available memory space for that data type.
Answer
overflow
- 55To store larger integer values than a standard_____
int(32 bits), C provides the `` data type, which typically uses 64 bits.Hint
This data type is used for integers that require a wider range of values.
Answer
long
- 56When performing division with integers in C, such as 1 divided by 3 resulting in 0, the decimal part is discarded, a process known as_____.
Hint
This term refers to cutting off the fractional part of a number without rounding.
Answer
truncation
- 57To correctly represent numbers with decimal points in C, you should use the_____
floatordoubledata types and the `%format code forprintf`.Hint
This format specifier is used for floating-point numbers.
Answer
f
- 58To temporarily treat an integer as a_____
floatin an arithmetic operation in C, you can useby writing(float)x / y.Hint
This technique allows you to explicitly convert a value from one data type to another.
Answer
casting
- 59The phenomenon where real numbers, like one third, cannot be perfectly represented by computers due to a finite number of bits, is known as floating point_____.
Hint
This issue relates to the exactness with which decimal values can be stored.
Answer
precision
- 60The Y2K problem was a concern because many computer systems used only two_____to represent years, leading to issues when 1999 rolled over to 2000.
Hint
This refers to the numerical representation of the year.
Answer
digits
- 61On January 19, 2038, many computer clocks using 32-bit integers to track seconds since January 1, 1970, are expected to experience_____.
Hint
This is the same type of problem that caused the Boeing 787 to lose electrical power.
Answer
overflow
- 62The_____
int main(void)line in a C program is a required part of the code and is analogous to Scratch's 'when green flag clicked' block, serving as the program's primarypoint.Hint
This function is where the execution of a C program begins.
Answer
entry
- 63Indentation and spacing in C code, though not strictly necessary for the computer, are crucial for_____and are evaluated as part of a program's style.
Hint
This aspect makes code easier for humans to understand and follow.
Answer
readability
- 64The_____
style50tool in VS Code provides suggestions on how to improve theof your code so it looks like the right way programmers would generally write it.Hint
This tool focuses on the aesthetic and formatting aspects of your code.
Answer
style
- 65The programming principle of 'don't repeat yourself' (DRY) suggests that you should avoid duplicating_____in your code to prevent errors and improve maintainability.
Hint
This means minimizing redundant sections of instructions.
Answer
code
- 66In C, using_____
counter++is a concise way toa variable by one, which is equivalent tocounter = counter + 1.Hint
This operation increases the value of a variable by one.
Answer
increment
- 67If you want to perform an action at least once but potentially repeatedly while a condition is true, the `_____while` loop is typically the most suitable construct.
Hint
This type of loop guarantees that the block of code inside it will execute at least once before checking the condition.
Answer
do
- 68In programming, variables only exist within the curly braces where they are defined, a concept known as_____.
Hint
This term defines the region of a program where a variable is accessible.
Answer
scope
- 69When you want a function to explicitly hand you back a value, you use the `_____` keyword followed by the value.
Hint
This keyword is used to send a value back from a function to the caller.
Answer
return
- 70The_____
check50command line tool helps evaluate theof your code, finding many potential mistakes.Hint
This tool verifies if your code performs as expected according to problem specifications.
Answer
correctness
- 71The_____
design50button in VS Code, powered by CS50's Duck, offers qualitative advice on how to improve theof your code.Hint
This tool focuses on the structural and conceptual quality of your program.
Answer
design
- 72In programming, a 'magic number' refers to a numerical value that appears directly in the code without any_____or explanation.
Hint
These are often hard-coded values whose meaning is not immediately clear.
Answer
context
- 73To prevent a variable's value from being changed after its initial assignment, you can declare it as a `_____int
, whereconst` stands for constant.Hint
This keyword indicates that the value of the variable cannot be modified.
Answer
const
- 74Notes to yourself within the code that are ignored by the compiler are called_____and are started with
//for a single line.Hint
These are explanatory annotations within the code, improving its readability for humans.
Answer
comments

Ask anything
We've read this whole study set, so questions about it get the best answers.