Programming in C Language – Advanced Concepts
Course code: CLPL01
Duration: 50 Hours
This course provides a thorough knowledge on advanced programming techniques, including the library functions and the usage of the pre-processor. Knowledge of C is highly marketable for summer internships, research oppurtunity program, and full-time positions in software and embedded systems development.
Those who have a need to learn and apply C programming techniques.
This course assumes a prior understanding of basics of programming in C Language.
To be proficient in:
- Continue development of C programming abilities by coding a variety of C programs.
- Deepen understanding of variable attributes such as local, global, external and static.
- Develop proficiency that perform file and interactive I/O.
- Gain an understanding of how C implements data structures.
- Learn and implement debugging methods and hints.
- Write small applications that "brings together" the knowledge and skills acquired in this course.
1. About this Course
- Course Objectives
- Course Overview
- Suggested References
2. Evolution of C – from past to eternity
- milestones: ANSI C, C89, C95, C99, C11
- obsolete (but still valid) language elements
- how have function declarations changed over time?
- trigraphs and digraphs
- new C11 keywords:
- _Alignof and _Alignas
- _Pragma, _ _func_ _
3 Handling variable number of parameters (
- calling conventions, passing parameters, stack usage, stack frame, returning a value, recursion
- vsprintf(), vprintf(), vfprintf()
- vscanf(), vsscanf(), vfscanf()
- (_ _VA_ARGS_ _)
4. Low level IO (
- POSIX, API, ABI, WINAPI, etc.
- symlink(), link()
- fcntl(), ioctl()
5. Memory and strings (
- Unicode, UCS, UTF-8 – how to deal with a multilingual environment?
- universal character names
- wide characters supported in different C dialects (
, , …)
- strcoll() and wcscoll()
6. Processes and threads
- wait() and waitpid
- processes – the MS Windows way:
- POSIX threads
- MS Windows threads
- C11 threads (
7. Floats and ints once again (
, , et al.)
- IEEE-754: a different universe
- NaN, infinity, zero
- floats and doubles – should we trust them?
- numerical anomalies vs precision
- what is a pragma?
- FENV_ACCESS pragma
- floating-point exceptions
- multi-precision libraries (GMP, MPFR, MPIR)
8. Network sockets – the absolute basics
- const variables vs. volatile variables
- goto – why and why not, advantages, disadvantages and limitations
- long (non-local) jumps: setjmp() and longjmp()
- static array indices, designated initializers, compound literals, variable-length arrays, flexible array members, restrict keyword
- sequence points: why ++/-- may sometimes make you crazy
- the asm keyword
- portability issues and undefined behaviors