Home Syllabus Lecture lesson Lab Assignment Example Reference MyLS

Course software

We use 7zip as default zip/unzip tool (only for Windows OS). Download and install 7zip, and add its installation path to user's environment Path variable.

We use Visual Studio Code (VS Code) as default IDE for all programming tasks. Download and install VS Code to your computer. Start VS code, add C/C++ IntelliSense and Code Runner extensions.

We use GNU C/C++ compiler as default C compiler. If you use Windows OS, you can install the MinGW (Minimalist GNU for Windows) by downloading this cp264 software package (cp264_software_mingw64.zip) and follow the instructions in the included README.md file to install and configure the MinGW compiler and included utility programs.

For Mac or Linux users, there are equivalent C compilers. The quick solution is to open a terminal, and issue command gcc, that will prompt you to install the developer package with GNU compiler.

Code examples

The following code examples are for illustrating features of C programming language and data structures, not for production programming. Some of these examples are used in lessons.

  1. C program structure and organization
  2. Data type, variables and constants:
  3. Basic operations:
  4. Bitwise operations:
  5. Flow controls:
  6. Functions
  7. Specifiers and scope
  8. Pointers:
  9. Arrays
  10. Array sort:
  11. 2D arrays
  12. String
  13. Structure
  14. Union
  15. Enumeration
  16. File read
  17. File write
  18. csv file read and write
  19. Linked lists
  20. Linked list with separated files
  21. Queues
  22. Stacks
  23. Stack applications:
  24. Trees
  25. Tree applications
  26. AVL trees
  27. Red-Black-tree and others
  28. Hash tables
  29. Heaps
  30. Graph representations and operations
  31. Application algorithms on graphs