Podcast
Questions and Answers
What percentage of the final grade do the quizzes contribute?
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.
Students are allowed to miss more than one quiz without penalty.
False (B)
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.
Match the assessment type with its grade contribution:
Match the assessment type with its grade contribution:
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?
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.
What is the value of 2.25e-3 in decimal form?
What is the value of 2.25e-3 in decimal form?
Floating-point constants can also be expressed in __________ notation.
Floating-point constants can also be expressed in __________ notation.
Match the floating-point types with their descriptions:
Match the floating-point types with their descriptions:
Which book is primarily used for C programming in this course?
Which book is primarily used for C programming in this course?
The course covers LINUX/UNIX Systems Basics for one week.
The course covers LINUX/UNIX Systems Basics for one week.
What is the primary focus of the course regarding programming practice?
What is the primary focus of the course regarding programming practice?
The course includes topics on ________ memory, focusing on stack and heap differences.
The course includes topics on ________ memory, focusing on stack and heap differences.
Match the following topics with their corresponding time allocations:
Match the following topics with their corresponding time allocations:
Which section will include custom data types using typedef?
Which section will include custom data types using typedef?
Branching and looping are covered under C Basics.
Branching and looping are covered under C Basics.
What does the course aim to teach regarding pointers?
What does the course aim to teach regarding pointers?
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?
Completing the Academic Integrity Tutorial contributes to the final grade weight.
Completing the Academic Integrity Tutorial contributes to the final grade weight.
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.
In order to achieve a passing grade, students must pass the ________ and ________.
In order to achieve a passing grade, students must pass the ________ and ________.
Match the following assessments with their respective weights:
Match the following assessments with their respective weights:
Which of the following assessments has the lowest weight?
Which of the following assessments has the lowest weight?
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.
Who are the teaching assistants for the labs?
Who are the teaching assistants for the labs?
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?
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.
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?
The format specifier for printing a long double in C is ___
The format specifier for printing a long double in C is ___
Match the following type specifiers with their correct descriptions:
Match the following type specifiers with their correct descriptions:
What type of values does a short int store?
What type of values does a short int store?
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.
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;
What does the post-increment operator i++ do?
What does the post-increment operator i++ do?
The pre-increment operator is executed after the expression is evaluated.
The pre-increment operator is executed after the expression is evaluated.
What is the general format of a for loop in programming?
What is the general format of a for loop in programming?
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.
Match the operators with their functions:
Match the operators with their functions:
Which statement about relational operators is true?
Which statement about relational operators is true?
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?
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.
Flashcards
C Programming
C Programming
A programming language emphasizing system programming, embedded systems, and low-level manipulation of computer resources.
Programming Practice
Programming Practice
Practical application of programming skills, often involving debugging, testing, and style guidelines.
LINUX/UNIX
LINUX/UNIX
A family of operating systems characterized by its command-line interface and modular design.
Variables and Data types
Variables and Data types
Signup and view all the flashcards
Functions
Functions
Signup and view all the flashcards
Pointers
Pointers
Signup and view all the flashcards
Multi-module programs
Multi-module programs
Signup and view all the flashcards
Dynamically-linked libraries
Dynamically-linked libraries
Signup and view all the flashcards
Discussion Assignments
Discussion Assignments
Signup and view all the flashcards
Quizzes
Quizzes
Signup and view all the flashcards
Minimum Credible Attempt (MCA)
Minimum Credible Attempt (MCA)
Signup and view all the flashcards
Lab Exam 1
Lab Exam 1
Signup and view all the flashcards
Lab Exam 2
Lab Exam 2
Signup and view all the flashcards
Final Exam Weight
Final Exam Weight
Signup and view all the flashcards
Passing the Class
Passing the Class
Signup and view all the flashcards
Lab Exam 2 Weight
Lab Exam 2 Weight
Signup and view all the flashcards
Midterm Exam Weight
Midterm Exam Weight
Signup and view all the flashcards
Assignments Weight
Assignments Weight
Signup and view all the flashcards
Lab Exercises Weight
Lab Exercises Weight
Signup and view all the flashcards
On-line Discussions Weight
On-line Discussions Weight
Signup and view all the flashcards
Academic Integrity Tutorial
Academic Integrity Tutorial
Signup and view all the flashcards
Floating-point constants
Floating-point constants
Signup and view all the flashcards
Scientific notation for floating-point values
Scientific notation for floating-point values
Signup and view all the flashcards
Mantissa
Mantissa
Signup and view all the flashcards
Exponent in scientific notation
Exponent in scientific notation
Signup and view all the flashcards
The 'double' type
The 'double' type
Signup and view all the flashcards
Post-increment operator
Post-increment operator
Signup and view all the flashcards
Pre-increment operator
Pre-increment operator
Signup and view all the flashcards
Increment/Decrement Operators
Increment/Decrement Operators
Signup and view all the flashcards
for statement
for statement
Signup and view all the flashcards
Initial statement in for loop
Initial statement in for loop
Signup and view all the flashcards
Loop condition in for loop
Loop condition in for loop
Signup and view all the flashcards
Loop statement in for loop
Loop statement in for loop
Signup and view all the flashcards
Relational Operators
Relational Operators
Signup and view all the flashcards
long int
long int
Signup and view all the flashcards
%li or %ld
%li or %ld
Signup and view all the flashcards
long long int
long long int
Signup and view all the flashcards
%lli format character
%lli format character
Signup and view all the flashcards
long double
long double
Signup and view all the flashcards
%Lf or %Le
%Lf or %Le
Signup and view all the flashcards
short int
short int
Signup and view all the flashcards
Minimum size of 'short int'
Minimum size of 'short int'
Signup and view all the flashcards
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.