Podcast
Questions and Answers
What percentage of the final grade do the quizzes contribute?
What percentage of the final grade do the quizzes contribute?
Students are allowed to miss more than one quiz without penalty.
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?
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.
Lab Exam 1 contributes _____ of the final grade.
Signup and view all the answers
Match the assessment type with its grade contribution:
Match the assessment type with its grade contribution:
Signup and view all the answers
Which of the following is a valid example of a floating-point constant?
Which of the following is a valid example of a floating-point constant?
Signup and view all the answers
The printf() function uses the format specifier %e for printing floating-point numbers.
The printf() function uses the format specifier %e for printing floating-point numbers.
Signup and view all the answers
What is the value of 2.25e-3 in decimal form?
What is the value of 2.25e-3 in decimal form?
Signup and view all the answers
Floating-point constants can also be expressed in __________ notation.
Floating-point constants can also be expressed in __________ notation.
Signup and view all the answers
Match the floating-point types with their descriptions:
Match the floating-point types with their descriptions:
Signup and view all the answers
Which book is primarily used for C programming in this course?
Which book is primarily used for C programming in this course?
Signup and view all the answers
The course covers LINUX/UNIX Systems Basics for one week.
The course covers LINUX/UNIX Systems Basics for one week.
Signup and view all the answers
What is the primary focus of the course regarding programming practice?
What is the primary focus of the course regarding programming practice?
Signup and view all the answers
The course includes topics on ________ memory, focusing on stack and heap differences.
The course includes topics on ________ memory, focusing on stack and heap differences.
Signup and view all the answers
Match the following topics with their corresponding time allocations:
Match the following topics with their corresponding time allocations:
Signup and view all the answers
Which section will include custom data types using typedef?
Which section will include custom data types using typedef?
Signup and view all the answers
Branching and looping are covered under C Basics.
Branching and looping are covered under C Basics.
Signup and view all the answers
What does the course aim to teach regarding pointers?
What does the course aim to teach regarding pointers?
Signup and view all the answers
What is the weight of the final exam in achieving a passing grade?
What is the weight of the final exam in achieving a passing grade?
Signup and view all the answers
Completing the Academic Integrity Tutorial contributes to the final grade weight.
Completing the Academic Integrity Tutorial contributes to the final grade weight.
Signup and view all the answers
List one reason why a student might be required to attend office hours.
List one reason why a student might be required to attend office hours.
Signup and view all the answers
In order to achieve a passing grade, students must pass the ________ and ________.
In order to achieve a passing grade, students must pass the ________ and ________.
Signup and view all the answers
Match the following assessments with their respective weights:
Match the following assessments with their respective weights:
Signup and view all the answers
Which of the following assessments has the lowest weight?
Which of the following assessments has the lowest weight?
Signup and view all the answers
Students are allowed to fail both lab exams and still pass the course.
Students are allowed to fail both lab exams and still pass the course.
Signup and view all the answers
Who are the teaching assistants for the labs?
Who are the teaching assistants for the labs?
Signup and view all the answers
What is the format specifier used to print a long integer in C?
What is the format specifier used to print a long integer in C?
Signup and view all the answers
A short int can take up less than 16 bits of storage space.
A short int can take up less than 16 bits of storage space.
Signup and view all the answers
What is the minimum guaranteed width of a long long int in C?
What is the minimum guaranteed width of a long long int in C?
Signup and view all the answers
The format specifier for printing a long double in C is ___
The format specifier for printing a long double in C is ___
Signup and view all the answers
Match the following type specifiers with their correct descriptions:
Match the following type specifiers with their correct descriptions:
Signup and view all the answers
What type of values does a short int store?
What type of values does a short int store?
Signup and view all the answers
The L modifier is used when printing floating-point values of type long double.
The L modifier is used when printing floating-point values of type long double.
Signup and view all the answers
To declare a long double variable, the correct syntax is long double ___ = 1.234e+7L;
To declare a long double variable, the correct syntax is long double ___ = 1.234e+7L;
Signup and view all the answers
What does the post-increment operator i++ do?
What does the post-increment operator i++ do?
Signup and view all the answers
The pre-increment operator is executed after the expression is evaluated.
The pre-increment operator is executed after the expression is evaluated.
Signup and view all the answers
What is the general format of a for loop in programming?
What is the general format of a for loop in programming?
Signup and view all the answers
In a for loop, the __________ is checked before the loop body is executed.
In a for loop, the __________ is checked before the loop body is executed.
Signup and view all the answers
Match the operators with their functions:
Match the operators with their functions:
Signup and view all the answers
Which statement about relational operators is true?
Which statement about relational operators is true?
Signup and view all the answers
If i = 3 and x = ++i + 2, what will be the value of x after this operation?
If i = 3 and x = ++i + 2, what will be the value of x after this operation?
Signup and view all the answers
In a for loop, the initial-statement runs only once for each iteration of the loop.
In a for loop, the initial-statement runs only once for each iteration of the loop.
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.
Related Documents
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.