90 likes | 98 Views
Join us for an optional review session to prepare for the first midterm in ENG H192. We will cover topics such as algorithms, UNIX, pre-processor directives, variable types, operators, C program structure, I/O, file I/O, repetition structures, and selection structures.
E N D
Midterm I Review Topics Lecture M1 Winter Quarter
Optional Review Session for Midterm I • As you probably know, the first midterm in ENG H192 is scheduled for Monday, February 3rd. • The midterm is during the class period. • An optional review session will be held on Sunday evening, February 2nd. • Location - EA 160 • 6:00PM until all questions answered • Hosted by your friendly FEH UTAs Winter Quarter
What should be on the first mid term exam? • Can you name the topics and provide some type of organization for these topics? Winter Quarter
Topics for Midterm 1 • Algorithms & Flow Charts • UNIX (simple commands) • Pre-Processor Directives #include #define • Named Constants #define pi 3.141593 or const float pi = 3.141593; Winter Quarter
Topics for Midterm 1 • Variable types • int, float, char, double • Operators • types -- mathematical, logical, relational, and assignment • precedence • "computer math" • floating point versus integer Winter Quarter
Topics for Midterm 1 • C program basic structure • Comment statements • Pre-processor directives • Function definition statement • Comment statements • Declaration statements • Comment statements • Executable statements • Comment statements Winter Quarter
Possible typical "main" functions int main ( ) { . . . return 0 ; } void main ( ) { . . . return ; } Topics for Midterm 1 Winter Quarter
Topics for Midterm 1 • I/O • formats, including the specifications for the various data types -- %d, %f, %c • functions – scanf, printf, getchar, putchar • File I/O • FILE statement • functions – fopen, fclose, fscanf, fprintf Winter Quarter
Topics for Midterm 1 • Repetition structures • for for (k=1,a=0; k<20; k=k+3) a++; • while k=1; a=0; while(k<20) {k+=3; a++;} • do { } while k=1; a=0; do {k+=3; a++;} while(k<20); • Selection structures • if • if else • if else if else • switch - case Winter Quarter