Git Product home page Git Product logo

uibk-703004-c-programming's Introduction

Introduction to C Programming 2016

This repository is intended for groups 4 and 5, and is not essential for completing this course. All files provided are simply here to support your learning experience.

This stuff may not always be in line with the lecture, discretion is advised.

What you should know by now

This list will be extended over time and serves as a checklist for stuff you should know. Some of these bullets are not handled by the lecture, it is your responsibility to learn them on your own.

Linux / Shell

Basically everything taught in the Brückenkurs (see references). The more you know about the system you are using, the better. Understanding how components (kernel, operating system, programs, shell, networks, ...) interact is key.

  • File system hierarchy: ls / pwd / cd / mkdir / cp / mv / rm / touch
  • Viewing: cat / less / head / tail / df / du
  • Finding things: find / grep / whereis / whoami
  • Getting help: apropos / man / info / file / which / type
  • Permissions: chmod / chown
  • Archives: tar / zip / unzip / xz / gzip / gunzip
  • Environment variables / export / unset
  • Executing binaries / $PATH
  • Hidden files / ls -l / ls -a
  • Exit code of a command: $?
  • IO redirect: < / > / << / >> / <<< / 2> / 2>&1 / |
  • Managing your software / package management

Technical Stuff

  • What is the purpose of a compiler
  • Typical stages of a compiler
  • Calling gcc with additional flags (C standard, enables warnings)
  • Process memory layout

Makefile

  • Defining and using variables
  • Defining and invoking rules
  • Why .PHONY is needed
  • What target is build by default
  • How to build a specific target
  • Dependencies (prerequisites) of a target
  • Purpose of the targets all and clean
  • Forcing a rebuild of a target by passing -B
  • Predefined variables like $(CC) and $(RM)

C Programming

  • Hello World example
  • Variables / Types
  • Arithmetic / Conditionals / Overflows / Casts
  • if / else / switch
  • while / for / do while / continue / break / goto
  • enum / const / #define
  • Basic IO: printf / puts / putchar / scanf / getchar
  • struct / union / Bit fields
  • Functions: Signature / Declaration / Definition / Recursion / call-by-value / call-by-reference / pure (side-effect free) / tail-recursion / stack-frames (see 07_where_goes_my_stuff)
  • Arrays / Multi-dimensional Arrays / Strings
  • Pointer / Pointer arithmetic / void*
  • Global variables / Scope / static local variables
  • Dynamic memory management / malloc / free / valgrind
  • Using modules / static / extern / header guards
  • IO / buffering
  • Double linked list / single linked list / queue.h
  • Preprocessor magic

Don't Panic!

Sooner or later you will run into problems, follow these bullets:

  1. find problem
  2. isolate problem
  3. understand problem
  4. fix problem
  5. verify fix

Getting Help

  1. from the commandline: use tools like apropos and man to get information about general commands, functions, system calls, config files, etc.

  2. read the fucking manual: if you run into problems consider reading the manual or provided documentation before moving on.

  3. Google is your friend: Google can help you out even when the documentation can not. People might have run into the same problem as you. You may use other search engines, just stay away from Bing.

  4. IRC / forum / mailing list / bug tracker / email: neither the manual nor Google helped you solving the problem? Take a step back and revisit the facts and what you have already discovered in relation to the problem. Now you are pardoned to get in contact with somebody. A recommended approach is asking in the related IRC channel or forum.

  5. provide information: Most importantly, provide the necessary information. Add log files and similar info dumps to your question, otherwise people won't be able to help you. Be precise and state whether you talk about facts or presumptions.

References

Reference System

I'll use a virtualized, updated Ubuntu 16.04 LTS (64 Bit) as reference system. But you don't have to mimic this, hardly anything we do in this course is system specific. All modern GNU/Linux operating systems should behave similar to our doings.

uibk-703004-c-programming's People

Contributors

w4rh4wk avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.