1. Home
  2. Explore
  3. Computer Science
  4. Introduction to C Programming

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Introduction to C Programming

  • 74Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
The programming language introduced in week one for more traditional programming is called
.

74 questions

  1. 1
    The 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

  2. 2
    Scratch 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

  3. 3
    In 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

  4. 4
    The 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

  5. 5
    The 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

  6. 6
    Computers 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

  7. 7
    Patterns 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

  8. 8
    The 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

  9. 9
    A 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

  10. 10
    The 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

  11. 11
    The 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

  12. 12
    VS 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

  13. 13
    The 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

  14. 14
    The 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

  15. 15
    CS50'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

  16. 16
    A 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

  17. 17
    The 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

  18. 18
    To create a new file in the CS50 environment, you type the word code followed by the
    _____
    of the file you want to create.
    Hint

    This command specifies what the new file will be called.

    Answer

    name

  19. 19
    By 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

  20. 20
    In 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

  21. 21
    The command make hello represents the
    _____
    , which converts source code to machine code.
    Hint

    This tool is responsible for transforming human-readable code into executable instructions.

    Answer

    compiler

  22. 22
    After 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

    ./

  23. 23
    The command ls is 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

  24. 24
    When using a terminal window, the dollar sign $ at the beginning of a line is a convention indicating where you should
    _____
    your commands.
    Hint

    This symbol is a visual cue for the user's input area.

    Answer

    type

  25. 25
    Unlike code, make, or ls, 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

    ./

  26. 26
    In the context of C programming, printf is a function that can format text in interesting ways, serving a similar purpose to Scratch's
    _____
    block.
    Hint

    This Scratch block is used for displaying text on the screen.

    Answer

    say

  27. 27
    In C, when passing a string input to a function like printf, you must surround everything in
    _____
    quotes.
    Hint

    This type of quotation mark is used to delimit literal strings in C.

    Answer

    double

  28. 28
    The arcane detail \n within a string in C is called an
    _____
    sequence, 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

  29. 29
    In 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

  30. 30
    The output of the printf function, which is something that happens visually on the screen, is referred to as a
    _____
    effect.
    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

  31. 31
    The file at the top of the C code, like stdio.h, is called a
    _____
    file 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

  32. 32
    A
    _____
    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

  33. 33
    The commonly made mistake of typing studio.h instead of stdio.h highlights 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

  34. 34
    The 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

  35. 35
    The 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

  36. 36
    In 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

  37. 37
    When 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

  38. 38
    You must tell the computer what
    _____
    of variable it is, such as string for 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

  39. 39
    In 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

  40. 40
    To combine multiple inputs in a printf function, such as a string and a variable, you use
    _____
    like %s for string or %i for integer.
    Hint

    These special format specifiers act as markers for where values should be inserted into a formatted string.

    Answer

    placeholders

  41. 41
    The command cd in 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

  42. 42
    To 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

  43. 43
    The command mkdir is 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

  44. 44
    To move a file or folder from one place to another, or to simply rename it, you use the command `
    _____
    , short for move`.
    Hint

    This command can be used for both relocating and renaming files or directories.

    Answer

    mv

  45. 45
    The command rm is short for `
    _____
    `, and it is used to delete a file.
    Hint

    This command permanently deletes files or directories.

    Answer

    remove

  46. 46
    To 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

    ..

  47. 47
    Typing cd and nothing else in the terminal window will
    _____
    you back to your original folder, no matter where you are.
    Hint

    This shortcut quickly takes you to your home directory.

    Answer

    whisk

  48. 48
    In C, a char represents a single
    _____
    , unlike a string which can be one or more characters.
    Hint

    This data type stores a single letter, number, or symbol.

    Answer

    character

  49. 49
    When 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

  50. 50
    In 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

  51. 51
    The 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

  52. 52
    The multiplication operator in C is represented by a single
    _____
    symbol.
    Hint

    This symbol is commonly used in programming for multiplication.

    Answer
  53. 53
    The `
    _____
    ` 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

  54. 54
    The 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

  55. 55
    To 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

  56. 56
    When 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

  57. 57
    To correctly represent numbers with decimal points in C, you should use the float or double data types and the `%
    _____
    format code forprintf`.
    Hint

    This format specifier is used for floating-point numbers.

    Answer

    f

  58. 58
    To temporarily treat an integer as a float in an arithmetic operation in C, you can use
    _____
    by writing (float)x / y.
    Hint

    This technique allows you to explicitly convert a value from one data type to another.

    Answer

    casting

  59. 59
    The 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

  60. 60
    The 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

  61. 61
    On 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

  62. 62
    The 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 primary
    _____
    point.
    Hint

    This function is where the execution of a C program begins.

    Answer

    entry

  63. 63
    Indentation 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

  64. 64
    The style50 tool in VS Code provides suggestions on how to improve the
    _____
    of 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

  65. 65
    The 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

  66. 66
    In C, using counter++ is a concise way to
    _____
    a variable by one, which is equivalent to counter = counter + 1.
    Hint

    This operation increases the value of a variable by one.

    Answer

    increment

  67. 67
    If 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

  68. 68
    In 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

  69. 69
    When 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

  70. 70
    The check50 command line tool helps evaluate the
    _____
    of your code, finding many potential mistakes.
    Hint

    This tool verifies if your code performs as expected according to problem specifications.

    Answer

    correctness

  71. 71
    The design50 button in VS Code, powered by CS50's Duck, offers qualitative advice on how to improve the
    _____
    of your code.
    Hint

    This tool focuses on the structural and conceptual quality of your program.

    Answer

    design

  72. 72
    In 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

  73. 73
    To prevent a variable's value from being changed after its initial assignment, you can declare it as a `
    _____
    int, where const` stands for constant.
    Hint

    This keyword indicates that the value of the variable cannot be modified.

    Answer

    const

  74. 74
    Notes 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

1 of 74
Question 1 of 74

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent