C Programming Course Assessment Quiz
42 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What percentage of the final grade do the quizzes contribute?

  • 5% (correct)
  • 10%
  • 20%
  • 15%
  • Students are allowed to miss more than one quiz without penalty.

    False

    What is required for an assignment or lab exercise to receive a grade?

    A minimum credible attempt

    Lab Exam 1 contributes _____ of the final grade.

    <p>5%</p> Signup and view all the answers

    Match the assessment type with its grade contribution:

    <p>Quizzes = 5% Lab Exam 1 = 5% Lab Exam 2 = 10% Discussion = 5%</p> Signup and view all the answers

    Which of the following is a valid example of a floating-point constant?

    <p>125.8</p> Signup and view all the answers

    The printf() function uses the format specifier %e for printing floating-point numbers.

    <p>False</p> Signup and view all the answers

    What is the value of 2.25e-3 in decimal form?

    <p>0.00225</p> Signup and view all the answers

    Floating-point constants can also be expressed in __________ notation.

    <p>scientific</p> Signup and view all the answers

    Match the floating-point types with their descriptions:

    <p>float = Used for single-precision floating-point numbers double = Used for double-precision floating-point numbers %f = Format specifier for float in printf() %e = Format specifier for scientific notation in printf()</p> Signup and view all the answers

    Which book is primarily used for C programming in this course?

    <p>Programming in C</p> Signup and view all the answers

    The course covers LINUX/UNIX Systems Basics for one week.

    <p>False</p> Signup and view all the answers

    What is the primary focus of the course regarding programming practice?

    <p>To practice programming through various guides and materials posted on Canvas.</p> Signup and view all the answers

    The course includes topics on ________ memory, focusing on stack and heap differences.

    <p>Dynamic</p> Signup and view all the answers

    Match the following topics with their corresponding time allocations:

    <p>C Basics = 1.5 weeks Program memory = 2 weeks Larger programs and libraries = 0.5 weeks Dynamic memory = 1 week</p> Signup and view all the answers

    Which section will include custom data types using typedef?

    <p>Program memory</p> Signup and view all the answers

    Branching and looping are covered under C Basics.

    <p>True</p> Signup and view all the answers

    What does the course aim to teach regarding pointers?

    <p>The course aims to teach about pointers, pointer arithmetic, and their applications in programming.</p> Signup and view all the answers

    What is the weight of the final exam in achieving a passing grade?

    <p>35%</p> Signup and view all the answers

    Completing the Academic Integrity Tutorial contributes to the final grade weight.

    <p>False</p> Signup and view all the answers

    List one reason why a student might be required to attend office hours.

    <p>To ask questions about lecture materials or assignments.</p> Signup and view all the answers

    In order to achieve a passing grade, students must pass the ________ and ________.

    <p>lab exam 2, final exam</p> Signup and view all the answers

    Match the following assessments with their respective weights:

    <p>Assignments = 15% Midterm exam = 15% Lab exam 2 = 10% Quizzes = 5%</p> Signup and view all the answers

    Which of the following assessments has the lowest weight?

    <p>Quizzes</p> Signup and view all the answers

    Students are allowed to fail both lab exams and still pass the course.

    <p>False</p> Signup and view all the answers

    Who are the teaching assistants for the labs?

    <p>Ardalan Askarian, Matthew Delorme, Spencer O'Lain, Mark Jia, McKayla Boguski.</p> Signup and view all the answers

    What is the format specifier used to print a long integer in C?

    <p>%ld</p> Signup and view all the answers

    A short int can take up less than 16 bits of storage space.

    <p>False</p> Signup and view all the answers

    What is the minimum guaranteed width of a long long int in C?

    <p>64 bits</p> Signup and view all the answers

    The format specifier for printing a long double in C is ___

    <p>%Lf</p> Signup and view all the answers

    Match the following type specifiers with their correct descriptions:

    <p>long int = At least 32 bits wide long long int = Guaranteed to be at least 64 bits wide short int = Uses less memory than regular int long double = Used for high-precision floating-point values</p> Signup and view all the answers

    What type of values does a short int store?

    <p>Fairly small integer values</p> Signup and view all the answers

    The L modifier is used when printing floating-point values of type long double.

    <p>True</p> Signup and view all the answers

    To declare a long double variable, the correct syntax is long double ___ = 1.234e+7L;

    <p>largeNumber</p> Signup and view all the answers

    What does the post-increment operator i++ do?

    <p>Increases i by 1 after using it in an expression.</p> Signup and view all the answers

    The pre-increment operator is executed after the expression is evaluated.

    <p>False</p> Signup and view all the answers

    What is the general format of a for loop in programming?

    <p>for (initial-statement; loop-condition; loop-statement)</p> Signup and view all the answers

    In a for loop, the __________ is checked before the loop body is executed.

    <p>loop-condition</p> Signup and view all the answers

    Match the operators with their functions:

    <p>++i = Pre-increment operator i++ = Post-increment operator --i = Pre-decrement operator i-- = Post-decrement operator</p> Signup and view all the answers

    Which statement about relational operators is true?

    <p>They have lower precedence than all arithmetic operators.</p> Signup and view all the answers

    If i = 3 and x = ++i + 2, what will be the value of x after this operation?

    <p>6</p> Signup and view all the answers

    In a for loop, the initial-statement runs only once for each iteration of the loop.

    <p>False</p> Signup and view all the answers

    Study Notes

    Course Information

    • Course name: CMPT 214 Programming Principles and Practice
    • Lecture 0: Introduction and Admin/UNIX basics
    • Required textbooks:
      • Kochan, Programming in C, 4th edition, 2014.
      • Sobell, Practical Guide to Linux Commands, Editors, and Shell Programming, 4th edition, 2017.
    • Recommended textbooks:
      • Kernighan and Ritchie, The C programming language, 1988, ISBN 0201539926.
      • Kernighan and Pike, Practice Of Programming, 1999, ISBN 978-0-201-61586-9.
      • Hunt and Thomas, The pragmatic programmer: From journeyman to master, 2000, ISBN 978-0-201-61622-4.
      • Sarwar, Koretsky, and Sarwar, Unix: the textbook, 2005, ISBN 032122731X.
    • Topics covered:
      • C programming
      • Programming practice
      • Linux/Unix Systems Basics
    • Topics covered in detail (page 6)
      • C basics (intro to variables, data types, arithmetic, expressions, branching, looping, functions, arrays, character strings, C structures, arrays of structures and pointers, pointer arithmetic)
      • Program memory
      • Bitwise operations, extended data types, and the C preprocessor
      • Larger programs and libraries
      • Dynamic memory allocation
      • Miscellaneous and advanced C features
      • I/O and system calls
      • Miscellaneous topics
      • Version control (Git)
      • Build tools (make)
      • Debugging (gdb)
      • Filesystem & processes
      • The Shell (bash)
      • Text editors and utilities
    • Learning objectives (page 11-12)
      • Write bug-free, moderately complex C programs
      • Explain fundamental concepts of pointers (memory addresses and pointer arithmetic)
      • Describe the representation and storage of C program variables and arrays in memory
      • Decompose a large program into cohesive, separately-compiled modules and manage compilation and linking of those modules
      • Build and use statically and dynamically linked libraries
      • Describe operating systems and the software build process and its automation
      • Effectively use version control Git to manage non-trivial program
      • Utilize common UNIX/Linux commands and combine them to solve complex problems
      • Describe fundamental concepts around UNIX processes and the filesystem
      • Write non-trivial shell (bash) scripts
    • Assignments (page 15)
      • 15% of final grade (5 equally-weighted moderate programming assignments)
      • Due dates are strict
      • Extensions are granted on a case-by-case basis.
    • Labs (page 16-17)
      • 10% of final grade (5 equally-weighted short exercises)
      • Submissions are due at the end of lab time
      • No late submissions accepted
    • Discussions
      • 5% of final grade (4 equally-weighted online discussions)
    • Quizzes
      • 5 equally-weighted in-class quizzes
      • One unexcused quiz is permitted
    • Lab exams. (page 21)
      • Lab Exam 1: 5%
      • Lab Exam 2: 10%
    • Midterm Exam (page 23)
    • Final Exam (page 24)
    • Grading breakdown (page 25)
    • Lab information (page 26)
    • Office hours (page 27-28)
    • Help desk (page 29)
    • Academic integrity and collaborative work (page 30-31)
    • Tips for success (page 32)
    • UNIX fundamentals (page 33)
    • Navigate the filesystem (page 36–37)
    • Commands, arguments, and options (page 38-39)
    • Building blocks (page 40)
    • The --help option and the man pages (Page 41)
    • Next Class (page 42)
    • Quiz 1 (page 43)
    • Reading for topic 1 (Linux filesystems, utilities, and the shell) (page 44)
    • The Unix filesystems (page 45 -46)
    • The Unix filesystems (page 47-48)
    • The working directory and paths (page 49-54)
    • The command line (or the "shell")
    • The --help option and the man pages
    • Standard input and output
    • Redirection
    • Output Redirection
    • Input Redirection
    • Pipelines
    • Pipes: An Example
    • Pipes: Another Example
    • BASH scripting
    • BASH scripting: Variables
    • BASH scripting: command-line arguments
    • BASH scripting: branching using if-else
    • BASH scripting: conditional operators
    • BASH scripting: while loop
    • Next Class (C and make)
    • Programming; Assembly Languages
    • Programming; Higher-Level Languages
    • Operating Systems
    • Compiling, linking, and loading
    • Compiling, linking, and loading
    • Compilation vs. interpretation
    • Programming Environment
    • First C Program
    • First C program
    • First C Program
    • Basic Data Types
      • int
      • float
      • double
      • char
      • _Bool
      • Type Qualifiers: long, short, unsigned
    • Variables
    • Variable Name Conventions
    • Arithmetic expressions
    • Operator precedence
    • The unary minus operator
    • The modulus operator
    • Next class
    • Arrays; Example
    • Initializing Arrays, example
    • Character strings
    • Multidimensional arrays
    • Initializing multidimensional arrays
    • Functions
      • Functions in C
      • Functions example
      • Arguments and local variables
      • Automatic and static variables, examples
      • Global variables
      • Functions calling functions
    • Functions & Arrays
      • passing Arrays to functions using the same syntax
      • Arrays of Structures
    • Git: Branches
    • Git: Merging Branches
    • Git: Remotes
    • Git: Rebase, Squash
    • Git: Referencing Commits
    • Git: Commit Commands
    • Other Git Branch Commands
    • Next week (Structures & Memory)
    • Low-level File I/O
      • Low-level I/O: open()
      • Low-level I/O: close()
      • Low-level I/O: read() / write()
      • Low-level I/O: lseek()
    • C Library overview
    • OpenSSH utilities; Bash Scripting
    • OpenSSH : security
    • OpenSSH: configuration files
    • The ssh (secure shell) utility
    • The ssh utility: port forwarding
    • The ssh utility: X11 forwarding
    • The scp utility
    • The scp utility
    • The scp utility
    • Tmux
    • The rsync utility
    • The rsync utility
    • Next week
    • Miscellaneous and advanced Bash tools, C, C preprocessor
    • Awk, Sed
    • Program portability
    • Macros

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    Test your knowledge on the assessment structure of the C programming course. This quiz covers topics such as quiz contributions to the final grade, floating-point constants, and course material focus areas. Evaluate your understanding of essential programming concepts.

    More Like This

    Use Quizgecko on...
    Browser
    Browser