CSC 2000 Midterm Review (Spring Summer 2015) - CSC 2000 Introduction to C Programming Language Midterm Exam 1 Midterm Exam Two parts Knowledge part

CSC 2000 Midterm Review (Spring Summer 2015) - CSC 2000...

This preview shows page 1 - 20 out of 113 pages.

CSC 2000 Introduction to C++ Programming Language Midterm Exam 06/23/2015 1
Image of page 1

Subscribe to view the full document.

Midterm Exam Two parts Knowledge part Programming part Picture ID (one card okay) No make-up Exam Slide 1- 2
Image of page 2
Study Book (Chapters 1 – 6) Lecture notes (Chapters 1 – 6) Lecture Assignments Slide 1- 3
Image of page 3

Subscribe to view the full document.

Midterm Directions Date: Tuesday 23, 2015 Time: Class time Location: Class location Exam duration: 95 minutes Closed Book 3-Cheat sheets – Both sides (typed or handwritten) 50 Multiple Choice Questions (200 points) 2 programming questions (50 points) Slide 1- 4
Image of page 4
Chapter 1: An Overview of Computers and Programming Languages
Image of page 5

Subscribe to view the full document.

Central Processing Unit and Main Memory 6
Image of page 6
The Language of a Computer (cont’d.) Byte : A sequence of eight bits Kilobyte (KB) : 2 10 bytes = 1024 bytes ASCII (American Standard Code for Information Interchange) 128 characters A is encoded as 1000001 (66th character) 3 is encoded as 0110011 7
Image of page 7

Subscribe to view the full document.

The Language of a Computer (cont’d.) EBCDIC Used by IBM 256 characters Unicode 65536 characters Two bytes are needed to store a character 8
Image of page 8
The Evolution of Programming Languages Early computers were programmed in machine language To calculate wages = rate * hours in machine language: 100100 010001 //Load 100110 010010 //Multiply 100010 010011 //Store 9
Image of page 9

Subscribe to view the full document.

The Evolution of Programming Languages (cont’d.) Using assembly language instructions, wages = rate • hours can be written as: LOAD rate MULT hour STOR wages 10
Image of page 10
The Evolution of Programming Languages (cont’d.) High-level languages include Basic, FORTRAN, COBOL, Pascal, C, C++, C#, and Java Compiler : translates a program written in a high-level language into machine language The equation wages = rate • hours can be written in C++ as: wages = rate * hours; 11
Image of page 11

Subscribe to view the full document.

Processing a C++ Program 12
Image of page 12
The Problem Analysis–Coding– Execution Cycle Algorithm : Step-by-step problem-solving process Solution achieved in finite amount of time 13
Image of page 13

Subscribe to view the full document.

Programming Methodologies Two popular approaches to programming design Structured Object-oriented 14
Image of page 14
Structured Programming Structured design : Dividing a problem into smaller subproblems Structured programming : Implementing a structured design The structured design approach is also called: Top-down (or bottom-up) design Stepwise refinement Modular programming 15
Image of page 15

Subscribe to view the full document.

Object-Oriented Programming Object-oriented design (OOD) Identify components called objects Determine how objects interact with each other Specify relevant data and possible operations to be performed on that data Each object consists of data and operations on that data 16
Image of page 16
ANSI/ISO Standard C++ C++ was designed to implement OOD OOD is used with structured design C++ evolved from C C++ designed by Bjarne Stroustrup at Bell Laboratories in early 1980s Many different C++ compilers were available C++ programs were not always portable from one compiler to another In mid-1998, ANSI/ISO C++ language standards were approved 17
Image of page 17

Subscribe to view the full document.

Chapter 2: Basic Elements of C++
Image of page 18
Comments
Image of page 19

Subscribe to view the full document.

Image of page 20
  • Fall '09
  • reserved word

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

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes