Presentation is loading. Please wait.

Presentation is loading. Please wait.

UMBC CMSC 104 – Section 01, Fall 2016

Similar presentations


Presentation on theme: "UMBC CMSC 104 – Section 01, Fall 2016"— Presentation transcript:

1 UMBC CMSC 104 – Section 01, Fall 2016
Exam 1 Review

2 Notes & Announcements Exam 1 Postponed!
Old Date: Next Tuesday, 10/18 New Date: Next Thursday, 10/20 Next Tuesday, the TA will hold a Q&A session during class time Bring your questions about anything that might be on the exam

3 Hands-on Lab 2 Review

4 Hands-on Lab Results Most of you got the sum and the product without any problem Most of you were able to calculate the average, but often the decimals were truncated… Some of you got the largest & smallest calculations … but most of you did it the hard way

5 Calculating the Average
Works how you would expect, except… A float multiplied or divided by a float is always a float An integer multiplied or divided by a float is always a float An integer multiplied or divided by an integer is always an integer Even you’re storing the result in a float variable!

6 Dividing Integers & Floats

7 Output of Previous Slide
An Integer divided by an Integer: An Integer divided by a Float:

8 Finding the largest and smallest
Many ways to do this Compare each number to the others Gets kind of complicated Potentially lots of nested ifs We haven’t covered “complex” comparators like && yet A loop Also complicated Just add another variable!

9 Finding the largest and smallest

10 Lab 2 I posted two more files to the sample directory
stats.c – My “answer” to lab 2, which was used to create the sample output division.c – The division sample we went over when discussing averages Any other questions on this?

11 Exam 1 Review

12 Overview If it’s in the slides, it’s fair game Broad Concepts
Generally, concepts more important than specifics Broad Concepts Machine Architecture (parts of a computer) Data Storage Concepts Number Systems (Hex, Binary, Decimal) OS Concepts & Linux Algorithms & Algorithm Concepts C Basics (i.e. what we’ve covered so far)

13 Machine Architecture Content Creation vs Consumption
Computer components CPU, GPU, ALU, etc Speed & Storage measurements MHz, GHz, etc MB, GB, etc Volatile vs Non-volatile Serial vs Parallel

14 Data Storage Concepts Bits & Bytes Data Sizes (see table)

15 Number Systems Binary Hex Conversions Binary to Decimal
Decimal to Binary Hex to Decimal Decimal to Hex Hex to Binary Binary to Hex

16 OS Concepts & Linux What is an OS Ways to interact with an OS Linux
Files & Directories Frequently used commands See slides Know how to traverse the directory structure, create and delete files, etc

17 Algorithms & Algorithm Concepts
Definition of an algorithm Characteristics of an algorithm Pseudocode Concepts

18 C Basics Stages of compilation A basic C program template
Hello world! Preprocessor directives for symbolic constants #define Legal Variable Identifiers Declaring variables Variable types int, float, char Basic printf() and scanf() usage

19 Questions?


Download ppt "UMBC CMSC 104 – Section 01, Fall 2016"

Similar presentations


Ads by Google