html5
1 / 11

Midterm II Review Topics

Midterm II Review Topics. Lecture M2. Optional Review Session for Midterm II.

angus
Download Presentation

Midterm II Review Topics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Midterm II Review Topics Lecture M2 Winter Quarter

  2. Optional Review Session for Midterm II • The review session for ENG H192 second midterm will be on Sunday, March 2nd, in (Location TBD). The review will begin at 6:00pm and last until all questions are answered (estimated to be about 8:00pm). Ted Pavlic and Joe Ryan have agreed to host the review. • The midterm will be on Monday, March 3rd, during your regular ENG H192 class time. Winter Quarter

  3. What should be on the second mid term exam? • Can you name the topics and provide some type of organization for these topics? Winter Quarter

  4. Topics for Midterm 2 • 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 Winter Quarter

  5. Topics for Midterm 2 File I/O • FILE statement • detecting an EOF • functions – fopen, fclose, fscanf, fprintf, fgets • feof example: FILE *fptr; int k,a; float b,c; fptr=fopen(“data.dat”,”r”); k=fscanf(fptr,”%f”,&b); if(feof(fptr)||k==EOF) printf(“End of File\n”); Winter Quarter

  6. Topics for Midterm 2 • I/O • formats, including the specifications for the various data types -- %d, %f, %c, %ld, %s • functions – scanf, printf, getchar, putchar examples: int k,a; float b,c; k = scanf (“%f%d%f”, &b, &a, &c) ; if (k==EOF) printf (“End of file\n”) ; else if (k<3) printf (“Conversion Error\n”) ; Winter Quarter

  7. Topics for Midterm 2 • Arrays (one and two dimensional) • declaring an array • initializing an array • using (how to index) an array • Pointer variables • declaring a pointer variable • initializing a pointer • dereferencing a pointer • Arrays, Pointers, Values, and Addressing (like Quiz 4) Winter Quarter

  8. Topics for Midterm 2 • Character strings • declaring character strings (arrays of characters) • initializing character strings • using character strings • functions in <string.h> and <stdio.h> for handling and doing string I/O • comparing and sorting strings (strcpy, strcmp, strlen) Winter Quarter

  9. Topics for Midterm 2 • User-written functions • function prototype • function definition • function invocation • User libraries • user-written header files • user library files • using a user library file on CC command Winter Quarter

  10. Topics for Midterm 2 • MATLAB • basic syntax • vectors and matrices • math operators • loading data • plotting data • labeling axes and plots • writing a MATLAB function Winter Quarter

  11. Topics for Midterm 2 • Engineering Laboratory • data acquisition system • basic stress/strain concepts • relationship between stress and strain (Young's modulus) • what is a strain gauge • rocket motor performance basics • how to measure thrust • thrust-time curve • basic aerodynamics Winter Quarter

More Related