Southampton University DACE
Introduction to Programming
JC154
Overview of Sessions
Tutor : David Millard (dem@soton.ac.uk)
This course is intended to introduce computer programming to
those who have little or no previous experience.
The teacher this semester is David
Millard
The course is assessed as follows:
- 20% Coursework1
- 40% Coursework2
- 40% Coursework3
Also the following courseworks have now been set:
- Coursework1
- Coursework2
- Coursework3
I have compiled a list of resources that are available for you
to use. Of particular interest will be the free compilers and
online help. Follow the link below to find them:
Resources
The course is designed in 12 sessions as follows (N.B. I'm
currently putting the notes onto the web, so more and more should
become available!):
make sure that everyone is registered to use the
computers or can use them for the evening.
use the Web browser called Netscape to find some course
notes on the C programming language.
use the Borland C compiler on the system to compile and
run a simple C program.
use the Web browser called Netscape to find some example
programs on the World Wide Web.
use the Borland compiler on the system to compile and run
some simple C programs
explore the use of printf and scanf. This will involve
building confidence and skills with the programming
environment provided.
examine how arithmetic can be done in C
discover problems which arise when care is not taken with
the correct use of types
introduce choice into our C programs by the use of if
- else
4) Control Structures
- Loops
try a couple of further examples of making decisions in C
programs
examine the sources of errors in the use of if - else
try an example of the case statement
try a loop structure in C
5) An Example Program
learn to use the C function called random
use it in a program to set arithmetic problems for
children
6) Functions
subdividing problems and thus making them easier to solve
giving the ability to re-use a good section of code you
have written
Worksheet
- An extended exercise to practice everything from the
previous 6 sessions
7) Pointers
- consolidate our confidence with home-made functions
- store an address in a pointer in C and use it
- use pointers to get multiple returns from functions
8) Arrays
check that we are confident about pointers
use an array to store many numbers and sort them into
order
search an array for a number using a binary search
algorithm
9) Strings
consolidate our understanding of the use of arrays from
last week
begin work on strings in preparation for the final
coursework
10) Dynamic Memory
Allocation
consolidate our understanding of the use of strings
explore the notion of dynamic memory allocation
11) Advanced Topics
recursion
structs
bitwise operations
12) Data Structures
- make sure all our administration is done
- we will take a look at how to start building more complex
data structures using structs, in this case, a list
Additional Work
Through the sessions in this course we have covered a large
portion of the C language, in particular concentrating on those
aspects that are relevant to other procedural languages (i.e.
control structures, functions, memory management). However there
are other things in the language that are worth spending some
time on. The following sessions are ones that we will not
actually do in the course but are still worth you looking at in
your own time.
explore the use of text files in C
see how we can use text files as input for commercial
programs