Enkeltfag Danish 5 ECTS

Basic C Programming

Overall Course Objectives

To develop fundamental programming skills in C so you can write programs in a readable and systematic way and test and analyze their functionality.

Learning Objectives

  • Set up a development environment for C programming.
  • Organize code in a Git repository and use basic workflows such as init, add, and commit.
  • Visualize program logic with flowcharts to plan a solution.
  • Recognize, explain, and use fundamental C programming concepts, including program structure, syntax, data types, variables, and operators.
  • Read data from the keyboard and files, and write data to the screen and files using the standard library.
  • Use conditions and loops to control program flow.
  • Break down a large problem into functions.
  • Integrate and distribute functionality using header files.
  • Analyze and test functions with a debugger and test cases to solve programming problems.
  • Use addresses (pointers) together with essential functions for text input, text processing, and file handling.
  • Use arrays and structs to organize data.
  • Use AI-assisted development tools to generate, evaluate, and adapt code based on requirements and tests.

Course Content

Tools: You use VS Code to develop your programs and Git to keep a logbook of your code and share your work with others.

Flowcharts: You draw diagrams to design and describe a program before and during coding.

Program structure, syntax, variables, data types, operators: You learn how a program is built and how to work with data and calculations.

Program control: You choose control structures such as if-else, switch, and for/while loops to let the program make decisions and repeat processes.

Functions: You reuse code without copy-paste and write code that calculates or processes data differently depending on what you pass into the function—for example, a function that calculates the area of different shapes.

Header files: You build your programs on existing code written by others and write your own code that can be shared across multiple files.

Arrays: You collect data of the same type (e.g., a list of temperatures or grades) instead of using one variable per value.

Pointers: You work with the memory address where data is stored instead of copying large amounts of data, and because arrays and some functions operate directly with addresses.

Structs: You group multiple values of different data types into a single variable—for example, name, age, and weight of a person.

Debugging: You handle compilation errors and learn how to investigate errors in your program’s functionality.
Strings: Humans communicate with computers through text stored as strings. You learn how to read, write, and manipulate strings.

File I/O: You read data from files into your program instead of entering them manually, and store the processed results back to a file.

AI-assisted programming: After learning the fundamentals, you try developing with AI as a helper. You specify requirements and write tests, repeating the process until the requirements are met.

Teaching Method

You work with problems and assignments that form the basis of your exam. You prepare the theory at home and develop it further during the lessons.

Remarks

Energy Technology and Computer Science
Elektrisk Energiteknologi 1. semester
Elektroteknologi: 1. semester

Part of the teaching may be in English.

See course in the course database.

Registration

Language

Danish

Duration

13 uger

Institute

Engineering Technology

Place

DTU Ballerup Campus

Course code 62713
Course type Graduate Engineer
Days Wed 13-17
Price

9.250,00 DKK

Registration