Guia docente 2015_16
Escuela de Ingeniería de Telecomunicación
Grao en Enxeñaría de Tecnoloxías de Telecomunicación
 Subjects
  Programming I
   Contents
Topic Sub-topic
Lecture 1: The algorithm and the programming languages. 1. The algorithm and its different representations: flowchart, pseudocode, natural language.
2. Algorithm implementation by means of a programming language. Programming paradigms: modular programming and structured programming.
3. C language and the function main(). Source code and object code. The compiler and the interpreter.
4. Input/output exercises: human-computer interface. The standard input/output files: stdin, stdout. The #include<stdio.h> directive. Library functions.
Lecture 2: Grammar and basic elements
of C language.
1. The alphabet. Recursive derivations of sintactically valid sequences. Identifiers, numbers. Symbolic constants: The #define directive and macros. Use of the const qualifier.
2. Variables and their attributes: name, value, address, types. Pointer variables. Declaration of simple variables and pointers:
the direction & and reference * operators.
3. The sizeof operator. Arithmetical operators. The assignment operator. Automatic type conversion and by means of the cast operator.
4. Syntactic notation for expressions and statements. Simple and compound statements.
Lecture 3: Sequential, iteration
and selection statements
1. Evaluation of expressions with relational operators and boolean operators.
2. Decision statements: switch, if, nested if. The ternary operator (?:)
3. The iterative statements and their importance in modular programming: while, do while and for. The break and continue statements.
Lecture 4: Functions: Introduction 1. Pointer arithmetic. Arrays and pointers. Dynamic memory allocation to 1 and 2 dimension arrays: the malloc(), calloc(), realloc() functions.
2. Arrays of characters: The end of string character. Library functions for dealing with arrays of characters.
3. Functions declaration and definition. Local variables in a compound statement. Parameter passing by value and by reference: use of pointers. Function return.
4. Static variables and global variables.
Lecture 5: Functions: special cases 1. Command line arguments passing:
argc and argv.
2. Recursive functions: advantages and disadvantages.
3. Creation and use of function libraries. The conditional directives in a header file.
4. Functions that return addresses.
Lecture 6: struct variables 1. struct variables: global declaration. Fields of a struct. Pointers to struct. The . (Point) and -> (arrow) operators.
2. struct and a pointer to struct as a funcion parameter and return value.
3. typedef with non trivial declarations.
4. More complex data structures: nested structs, array of structs.
5. Dynamic management in creating linear lists, circular lists and trees.
6. Insertion and removal of variables in a list.
Lecture 7: Files 1. Text files: fopen() and fclose() functions.
2. Different file input/output functions: fprintf (), fscanf(), fgets(), feof().
3. Functions with direct access to files.
4. Information management between files and lists.
5. Node structure in simple linked lists.
6. File to list conversion and vice versa.
Universidade de Vigo            | Rectorado | Campus Universitario | C.P. 36.310 Vigo (Pontevedra) | España | Tlf: +34 986 812 000