Transcript ppt
CSE1301
Computer Programming:
Revision
1
Topics
•
•
•
•
•
•
•
Type of questions
What do you need to know?
About the exam
Exam technique
Staff consultation
Revision Drop-in Centre
Sample questions
2
Types of Questions
• Exam
–
–
–
–
–
30 multiple choice worth 1 mark each
15 short-answer questions worth 2 marks each
90 marks worth of coding/programming questions
(no True/False questions)
150 marks in total - in 180 minutes
3
What Do You Need to Know?
Coverage:
• All lectures, practicals,
tutorials and readings.
4
Overview
• Gates
– AND, OR, NOT
• Binary representation
–
–
–
–
–
bit, byte, word
integer: decimal to binary, unsigned,
float: IEEE standard
precision, under/overflow
arithmetic operations
5
Overview
• Values
• Variables
• Types
– char, int, float, const, typedef, struct
– arrays (up to 2-D), strings, int for “Boolean”
• Operations
– initialization
– arithmetic, Boolean expressions, precedence
– string library functions
6
Overview
• Pointer Basics
– when to use & and *
• Structures
– definition vs. instance
– accessing members/elements
– array of structures
7
Overview
• Flow of control
– Flow diagrams/charts
• Iteration
– while, for
– nested loops
• Selection
– if...else
8
Overview
• Functions
– Prototypes
– Definition
– Parameters
• actual, formal, arrays, structs, pointers
– Return values
– Variable scope
– Recursion
9
Overview
• Streams
– stdio, stderr, stdout
• printf()and scanf()
– Format specifier
– Return values
– The & and * operators
• Files
– fopen(), fclose(), fprintf(), fscanf()
10
Overview
• Software Engineering
–
–
–
–
–
Development Process
Design: top-down, bottom-up
Structure Chart: Control and Data Coupling
Dataflow Diagrams
Test Data
11
Overview
• Searching
– linear search
– binary search
• Sorting
– insertion sort
– selection sort
• BUT not CODE for these, just algorithms
12
About the Exam
•
•
•
•
10 minutes reading time
3 hours duration
150 total marks
No calculators, books, notes, etc.
13
Exam Technique
• Don’t Panic.
• Make use of reading time.
• Go for the marks
– Attempt the questions in the order that gives the
best result
• Don’t spend too much time on any question.
– A bit over 1 minute per mark (150 marks in 180
minutes)
• Clearly indicate what question you are
attempting.
14
Exam Technique (continued)
• Work through the problems carefully
• For coding problems, focus on the result
required - what values do I need to print out in
the end? Exactly what do I need to calculate?
• Write down anything you know about the
problem
– Even if you only know how to write a skeleton of
the program, write that down!
• Don't forget to write your name and ID!
15
Staff Consultation During the
Exam Period
• Linda will be available between 11 and 12
on Tuesdays, Wednesdays and Thursdays
(room 130, building 26)
• Kym will be available 1-2pm Mondays &
Tuesdays (room 131, building 26)
• Rose will be available every week-day
between 1 and 2pm until the exam (room
G21, building 26)
16
Revision Drop-In Centre
• There will be a revision drop-in centre
with tutors and demonstrators providing
consultation
• Wednesday October 31, 1-4pm
• Friday November 2, 1-4pm
• Room G27, building 72 (behind the
Hargrave library)
17
Sample Questions
• Check out the sample exam on the web
for some sample questions
• Tutorial questions are good sample exam
questions
18
Sample Questions
• Typical questions will
– ask you to write small functions
– ask you to write algorithms to solve
problems
– ask you to convert flow charts to algorithms
– ask you to convert code to algorithms
– ask you to convert algorithms to code
– given an algorithm, show the values of
relevant variables
19
Sample Questions
• Typical questions (continued)
– given a flow diagram, show values of
relevant variables
– given an algorithm, or a flow diagram, or a
program written in C, provide test data
which will test all possible execution paths
– Most algorithms you will have to deal with
in the exam will be algorithms you have
seen before
20
Thank you!
• For listening
• For participating
• For your feedback
– if you have anything else you'd like to say
about the course, or the teaching of it, please
feel free to email, or drop a note in my
pigeon hole, or in at the office
21
22