Intermediate C

actually just some basic stuff that every C programmers must know

​​​Authors

Dicaprio Cheung (dhcheungaa@connect.ust.hk)

Daniel Cheung (dcheungaa@connect.ust.hk)

Ho Yu Yat (yyhoai@connect.ust.hk)

Lau Ka Kit, Danny (kkdlau@connect.ust.hk)

Li Ka Yau Elwin (kyeliaa@connect.ust.hk)

Leung Ka Chun, Wesley (kcleungax@connect.ust.hk)

Li Chi Kin, Andy (ckliam@connect.ust.hk)

Suggested Learning Materials

Helpful playlist

Watch #8 - #16, #19 - #22, #30.

Legacy tutorial videos

What should I do if I get stuck while programming?

Although programming can be fun, debugging is stressful and exhausting. You may come across some bugs that you cannot solve by yourself. Here are some useful websites to use:

The easiest way to debug is to print stuff out so that you can track (1) how your values change and (2) whether your code reaches a certain line of code (e.g. maybe an if-condition failed).

If you really don't know which lines of code cause bugs, you can comment on parts of your code and run the code again to see if the bugs reappear or not.

Enjoy your time debugging!

Using AI in coding

We welcome the integration of AI in software development. Using tools like ChatGPT to generate code or debug our code in English really makes our lives a whole lot easier :) However, when using them in your programming work, you need to be aware that they only act as your assistant. They can streamline your work but you can't just blame ChatGPT if the code is not fully functional or it has many bugs. It's your job to double-check their work and fix any errors.

When you decide to use ChatGPT to generate code. It is strongly recommended that you should understand and analyze the logic behind the code. Make sure you do understand why it decides to this line of code. You should not blindly trust all the code written by AI. Not only does training your technical skills, but it can also help you document your code better.

Reference Materials

https://www-s.acm.illinois.edu/webmonkeys/book/c_guide/

Last updated