Midterm Review.docx

3 Pages
111 Views
Unlock Document

Department
Electrical & Computer Engineer
Course
ECE 15
Professor
Alon Orlitsky
Semester
Fall

Description
1. Data Types a. “Numerical” Data types i. char 1. (single) character ii. int 1. integer values iii. float 1. single-precision floating point number iv. double 1. double-precision floating point number 2. twice as much memory as float b. “Array” Data Types i. string 1. not an individual data type 2. Variable Names a. Data is assigned to memory using the assignment operator (=) and reference through the use of variables. b. Variable names may only contain alphanumeric characters and underscores, and may not begin with numbers. 3. Printing and Scanning a. %c – characters b. %d – integers (%i also works, but is different and may throw different output) c. %f – float d. %lf – double (long float) i. THESE COULD BE USEDAS ERROR PROBLEMS IN THE MIDTERM. 4. Special Characters a. ‘ ‘ – single space b. ‘\t’– tab space c. ‘\n’– newline d. ‘\b’– backspace (i.e. overwrites characters if you attempt to input a new value after ‘\b’. However, this does not delete characters as the cursor moves back) e. ‘\0’– null character, and literally doesn’t print out anything. 5. Conditional Statements a. if (CONDITIONAL) x++; i. increments x only if CONDITIONAL is true. b. if (CONDITIONAL) x++; else x--; i. increments x if CONDITIONAL is true, decrements otherwise. c. Need to encl
More Less

Related notes for ECE 15

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit