Download presentation
Presentation is loading. Please wait.
1
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 1Winter Quarter Midterm I Review Topics Lecture M1
2
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 2Winter Quarter Optional Review Session for Midterm I As you probably know, the first midterm in ENG H192 is scheduled for Monday February 4th. The midterm is during the class period. An optional review session will be held on Sunday afternoon, February 3rd. –Location – McPherson Lab 1000 – MP 1000 –3:00 PM until all questions answered –Hosted by your friendly FEH TAs
3
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 3Winter Quarter What should be on the first mid term exam? Can you name the topics and provide some type of organization for these topics?
4
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 4Winter Quarter Topics for Midterm 1 Algorithms & Flow Charts Programming elements: –SEQUENCE – step by step commands –SELECTION – choose between two commands –REPETITION – repeat commands over and over –ABSTRACTION – use a set of packaged commands UNIX (simple commands, see Class Notes)
5
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 5Winter Quarter Topics for Midterm 1 Pre-Processor Directives #include #define text replacement Named Constants #define pi 3.141593 //No "=" sign! or const float pi = 3.141593;
6
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 6Winter Quarter Topics for Midterm 1 Variable data types –int, float, char, double Operators –types -- mathematical, logical, relational, and assignment –Precedence of operators "computer math" –floating point versus integer
7
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 7Winter 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
8
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 8Winter Quarter Topics for Midterm 1 Typical "main" function int main ( ) {. return 0 ; }
9
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 9Winter Quarter Topics for Midterm 1 I/O –Formats, including the specifications for the various data types -- %d, %f, %c –Functions – scanf, printf, getchar, putchar –When to use the “&” File I/O –FILE statement –Initialization and use of "file pointer" variables –Functions – fopen, fclose, fscanf, fprintf
10
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 10Winter Quarter Topics for Midterm 1 Repetition structures –forfor (k=1,a=0; k<20; k=k+3) a++; –whilek=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
11
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 11Winter Quarter Topics for Midterm Arrays –Declaring arrays –Initializing arrays –Reading data into arrays –Printing out arrays –Using array elements in assignment statements
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.