Guia docente 2017_18
Escola de Enxeñaría de Telecomunicación
Degree in Telecommunications Technologies Engineering
 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: Arrays 1. Declaration of array variables. Memory allocation for multidimensional arrays.
2. Unidimensional arrays and pointers: pointer arithmetic. Arrays of characters: the end of string character. Library functions for dealing with arrays of characters.
3.Variable length arrays in standard C99.
4. Dynamic memory allocation for 1 and 2 dimension arrays: the malloc(), calloc(), realloc() functions.
Lecture 5: Functions 1. Functions declaration and definition. Local, static and global variables. Function return value.
2. Actual and formal parameters. Parameter passing by value and by reference: use of pointers. Command line arguments passing to function main( ).
3. Creation and use of function libraries. Library functions for strings handling.
4. Modular compilation. The conditional directives in a header file.
5. Recursive functions: advantages and disadvantages.
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            | Reitoría | Campus Universitario | C.P. 36.310 Vigo (Pontevedra) | España | Tlf: +34 986 812 000