Computer programming
Politehnica International - Computer Engineering, 1st Semester
2012/2013
Schedule
Lectures: Tuesday, 10-13, room A204. conf.dr.ing. Ioana Sora
Labs: Monday, room B418.
as.ing. Gabriela Bobu
Textbooks
- Stephen Kochan, Programming in C, 3rd Edition, Sams Publishing, 2005. (main textbook of this course)
- Brian Kernighan and Dennis Ritchie, The C Programming Language, 2nd
Edition, Prentice Hall, 1988.
- Ioana Sora, Doru Todinca, Introducere in programarea calculatoarelor, Editura Politehnica Timisoara, 2004.
Learning objectives
First course in Computer Science, no previous computer knowledge is assumed.
By the end of the course, students will:
- Understand fundamental concepts of computer programming/imperative
structured programming languages
- Design algorithms to solve (simple) problems
- Use the C programming language
Exams 2013
Exam results are here
Prezentarea 3: miercuri, 27 martie 2013, ora 8,
lab B418. Atat partea
scrisa (de la ora 8) cat si partea practica (de la ora 9) vor
avea loc in sala de laborator.
Grading
The final grade results from: 2/3 written exam ,
1/3 lab assignements.
Lecture notes
The slides are from a previous edition of the course. Updates and changes may occur during this term !
- Week 1. Some Computing Fundamentals and History. Writing your
first C program. : ppt slides week 1
- Week 2. Variables, Data Types and Arithmetic Expressions. : ppt slides week 2
- Lecture outline: Variables, Basic data types, Storage sizes and
ranges, Type specifiers, Output with printf; Arithmetic operators;
Integer and floating-point conversions; Combining operations with
assignement.
- Lab
exercises (Week 3)
- Week 3. Program Loops. ppt slides week 3
- Lecture outline: Looping (for, nested loops, while, do, break,
continue); Relational operators; Simple program input with scanf.
- Lab
exercises (Week 4)
- Week 4. Conditional Statements. ppt slides week 4
- Lecture outline: Making Decisions (if, if-else, nested if, else if,
switch, conditional operator); Logical operators, boolean variables;
Character Input/output (getchar, putchar)
- Lab
exercises (Week 5)
- Week 5. Arrays . ppt slides
week 5
- Lecture outline: The concept of array; Defining arrays;
Initializing arrays; Multidimensional arrays; Variable length arrays;
Seminar.
-
Lab exercises (Week 6)
- Week 6. Functions ppt slides
week 6+7
- Lecture outline: Defining a function; calling a function; Arguments;
Local variables; Returning function results; Declaring a
function prototype; Functions with arrays as parameters.
- Lab
exercises (Week 7)
- Week 7. Functions continued from week 6
- Lecture outline: Global variables. Automatic and Static local
variables. Recursive functions. Seminar.
-
Lab exercises (Week 8)
- Week 8. More on Data types: Structures, Enumerated types,
typedef, type conversions ppt slides
week 8
- Week 9. Character Strings
ppt slides week 9
- Lecture outline: Character Arrays/ Character Strings; Initializing
Character Strings. The null string ; Escape Characters; Displaying
Character Strings; Inputting Character Strings; String processing
and functions; String to number conversion functions;
Arrays of structures Example: Simple dictionary program
- Lab
exercises (Week 10)
- Week 10. Pointers ppt slides
weeks 10+11
- Lecture outline: Pointers and Addresses; Pointers and Function
Arguments; Pointers and Arrays; Pointer Arithmetics; Pointers and strings
Dynamic memory allocation; Pointer arrays. Pointers to pointers;
Multidimensional arrays and pointers; Structures and pointers
- Lab
exercises (Week 11)
- Pointers, by Steve Summit link
- Memory allocation, by Steve Summit link
- Pointer allocation strategies, by Steve Summit link
- A complex tutorial on pointers and arrays in C, by Ted Jensen link
- Week 11. Pointers cont from previous week
- Week 12. Operations on bits
ppt slides
week 12
- Lecture outline: Binary representation of integer numbers;
Operations on bits: The Bitwise AND Operator,
The Bitwise Inclusive-OR Operator,
The Bitwise Exclusive-OR Operator,
The Ones Complement Operator ,
The Left Shift Operator,
The Right Shift Operator;
Binary representation of floating-point numbers;
Review: Operators: The complete table of operator's precedence.
- Lab exercises (Week 13)
- Additional reading: bithacks
- Week 13. Input and Output
ppt
slides week 13
- Lecture outline: Character I/O ; Formatted I/O ; I/O streams; EOF;
buffered/unbuffered; I/O redirection; Pipes.
- Week 14. Review Questions and Exercises
Miscellaneous links
Online C
course, Steve Summit
Online C/C++ course (with review questions and exercises), Paul Roberts,
Cambridge University
The current
standard for Programming Language C ISO/IEC 9899:1999