COURSE GOALS: The aim of this course is to provide students with the elementary programming tools and skills, based on the C programming language. As programming can enable students to independently simulate physical problems and explore various systems it is of critical importance that students become comfortable analysing problems, identifying small problem units and implementing solutions in code. Because programming is a skill, emphasis is placed on examples, exercises and individual work.
LEARNING OUTCOMES AT THE LEVEL OF THE PROGRAMME:
2. APPLYING KNOWLEDGE AND UNDERSTANDING
2.2. recognize and follow the logic of arguments, evaluate the adequacy of arguments and construct well supported arguments;
2.5. use information and communication technology efficiently (to foster active enquiry, collaboration and interaction in the classroom);
3. MAKING JUDGMENTS
3.1. develop a critical scientific attitude towards research in general, and in particular by learning to critically evaluate arguments, assumptions, abstract concepts and data;
5. LEARNING SKILLS
5.1. search for and use professional literature as well as any other sources of relevant information;
LEARNING OUTCOMES SPECIFIC FOR THE COURSE:
Upon completion of the course the student will be able to:
1. Identify the elements of a program, standard libraries, variables and functions
2. Use relation operators and loops to affect the execution of the program
3. Apply functions found in standard libraries
4. Construct and use user defined functions
5. Demonstrate familiarity of advanced constructs, 2 and multidimensional fields, strings and structures
6. Demonstrate working knowledge of manipulating files and data
1. Basic structure of program code, representation of numbers in computer memory, variable types and basic mathematical operations
2. Relation operators, control of program flow, comparing values, selection commands, loops (for and while loops)
3. User defined functions, function structure and declaration, function prototypes, function call by value, recursive functions, use of time function from time.h standard library, and srand and rand from stdlib.h library.
4. Arrays - declaration, initialization and organization of arrays in computer memory, arrays as function arguments, multidimensional fields, user defined structures
5. Pointers - memory address of a variable, address operator, pointer declaration and dereferencing, pointers as function arguments and function call by reference, pointer arithmetic, array as a constant pointer, dynamic memory allocation, function pointers
6. Strings - character array, reading and writing strings, NULL character as a string terminator, string manipulation functions within the string.h library
7. Working with files - opening and closing files, reading and writing data from/to files, formatted output, command line arguments
REQUIREMENTS FOR STUDENTS:
Students are required to regularly attend classes and computer lab, to participate in the exercises and to independently solve assignments each week.
GRADING AND ASSESSING THE WORK OF STUDENTS:
During the semester, two short exams are given covering a part of the course, each contributing 20% of the final grade. At the end of the semester, the students take the final exam which contributes the remaining 60% of the grade. All exams consist of programming problems and are solved using the computer.