Gold University of Minnesota M. Skip to main content.University of Minnesota. Home page.
 
 
 

What's inside.

Ta Email

Download Compiler

Final Project

Lab Notes

Office Hours

Schedule

Syllabus

Announcements

Check Grades

 

CSci 1113 Home

 
 

Printer-friendly version

 
Midterm Exam 1 Review - Spring 2009

Material covered: Savitch, Chapters 1 and 2

Here are some sample exam questions.

Introduction to Computers and C++ Programming

Know the basic principles of computers and computing, including hardware (i/o, memory, CPU) and software (machine, assembly, and high-level languages, compilers, operating systems) components, and the stages of  problem solving.

Chapter 1 - C++ Basics

Know the basic components of a C++ program:

    header files (e.g., #include<iostream>)
    main() function
    I/O (cin and cout objects)
    // comment statements
    variables
    assignment statement
    data types
    arithmetic operators 
    formatting output with stream functions: precision() and setf() with flags ios::showpoint, ios::fixed and ios::scientific.
    formatting output with the stream manipulator setw().

Be able to define the following terms relating to representation of numbers in a computer:

    Precision (the number of digits in the mantissa of a floating point number)
    Range
    Exponent
    Roundoff and relative errors
    Underflow and overflow errors

Chapter 2 - Flow of Control

Know how to build boolean expressions using relational operators (<, ==, <=, etc.) and logical operators (&&, ||, !).

Know how to use the following control structures:

    Branching structures - if, if-else, and switch statements
    Looping structures - while, do-while, and for loops

Be able to define the following terms:

    Pre- and post-test loops
    Fixed count loops (counter controlled repetition)
    Sentinel controlled loops

Finally:

Be able to write a complete C++ program that includes these components.

There will be some definitions on the exam - these can appear in TRUE/FALSE or "match-the-term" questions or will have to be explicitly written by you.


 
The University of Minnesota is an equal opportunity educator and employer.
CSci 1113: C++ Programming