Exam1-StudyGuide_Common Programming Mistakes.pdf - Computing I Dr Lin Study Guide for Mid-term 1 Binary • Understand how information(number characters

Exam1-StudyGuide_Common Programming Mistakes.pdf -...

This preview shows page 1 - 3 out of 8 pages.

Computing I Dr. Lin 1 Study Guide for Mid-term 1 Binary: Understand how information (number, characters) is represented in computers o How are decimal number represented? o How are characters represented (ASCII)? convert decimal to unsigned binary convert unsigned binary to decimal two’s complement notation – signed binary (convert a signed number into two’s complement form and convert a two’s complement to decimal) Standard output and input using printf, scanf what is the C library for printf, scanf know when and how to use %d (% m d, %- m d), %f (% m.n f, %- m.n f), %c o format string and print list how to use scanf (format string, & num) o %lf for floating type how to print some special characters, e.g., \n, \\, %%, \t validate an input number (e.g., negative, positive, certain range) with boolean expression and logical operators (don’t need to use clear_keyboard_buffer in exam) Variable in C explain the concept of a variable in C (what are the most important properties of a variable) declare a variable in C (int, double, float, char, user defined type) initialization of a variable assign a value to a variable with “=” o difference between = and == & (address of) scope of a variable valid identifiers in C (how to name variables, functions) Data Types in C int, char, float, double comparison with (<, >, >=, <=, ==, !=) arithmetic operation with (+, - , *, /, %) o integer division/remainder o division with double type mixed-type assignment Sequential structure: main function Executable statements
Image of page 1
Computing I Dr. Lin 2 Alternative structure When to use this type of structure if …else nested if; if else if, else if, else… How to pair an else in nested if o nearest previous if not paired with other else switch statement o when to use o difference from if –else o importance of break; statement The importance of using { and } for compound statements (multiple statements) in if-else Loop structure when to use a loop structure loop control variable (initial, check condition, update) for loop, while loop do-while loop (difference from above two) loop body The importance of using { and } for compound statements in loop
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 8 pages?

  • Fall '15

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors