Documents Found!
As seen in
Less Work, Better Grades
Join
Course Hero
Access
best resources
Ace
your classes
Ace your courses with Course Hero!
|
|
|
Study Smarter, Score Higher
Here are the top 5 related documents
...CSci 1905 - Fall 2008 Sample Exam Questions SOLUTIONS
1. Define "computational science". Answer: Computational science is a fast-growing interdisciplinary field that is at the intersection of the sciences, computer science, and mathematics.
2.
Giv...
...Project Proposal (Rev. 2) Reid Priedhorsky February 15, 2006 1
1.1
What is the project?
Summary
I propose to create a web site which contains a map that anyone can edit, i.e. a geowiki. The general problem to be addressed is that the nature of geog...
...HW1 Solutions CSci 2031 - Spring 2009 Homework Assignment 1
10 points/problem Due Feb. 4, 2009
Note: some of the homework problems will ask you to write and execute MATLAB Mfiles. You are to turn in a printed copy of the M-file and a diary showing ...
...Spring 09: CSci 5421-Advanced Algorithms and Data Structures
Sample Solution
(Prepared by Ravi Janardan)
This write-up illustrates what is expected by way of a solution for a problem involving the design and analysis of an algorithm (cf: Instruction...
Document Content (unformatted)
Course Hero has millions of student submitted documents similar to the one
below including study guides, homework solutions, papers, exam answer keys and textbook solutions.
7 Chapter Expressions and Assignment Statements ISBN 0-321-33025-0 Chapter 7 Topics Introduction Arithmetic Expressions Overloaded Operators Type Conversions Relational and Boolean Expressions Short-Circuit Evaluation Assignment Statements Mixed-Mode Assignment 1-2 Copyright 2006 Addison-Wesley. All rights reserved. Introduction Expressions are the fundamental means of specifying computations in a programming language To understand expression evaluation, need to be familiar with the orders of operator and operand evaluation Essence of imperative languages is dominant role of assignment statements Copyright 2006 Addison-Wesley. All rights reserved. 1-3 Arithmetic Expressions Arithmetic evaluation was one of the motivations for the development of the first programming languages Arithmetic expressions consist of operators, operands, parentheses, and function calls Copyright 2006 Addison-Wesley. All rights reserved. 1-4 Arithmetic Expressions: Design Issues Design issues for arithmetic expressions operator precedence rules operator associativity rules order of operand evaluation operand evaluation side effects operator overloading mode mixing expressions Copyright 2006 Addison-Wesley. All rights reserved. 1-5 Arithmetic Expressions: Operators A unary operator has one operand A binary operator has two operands A ternary operator has three operands Copyright 2006 Addison-Wesley. All rights reserved. 1-6 Arithmetic Expressions: Operator Precedence Rules The operator precedence rules for expression evaluation define the order in which adjacent operators of different precedence levels are evaluated Typical precedence levels parentheses unary operators ** (if the language supports it) *, / +, 1-7 Copyright 2006 Addison-Wesley. All rights reserved. Arithmetic Expressions: Operator Associativity Rule The operator associativity rules for expression evaluation define the order in which adjacent operators with the same precedence level are evaluated Typical associativity rules Left to right, except **, which is right to left Sometimes unary operators associate right to left (e.g., in FORTRAN) APL is different; all operators have equal precedence and all operators associate right to left Precedence and associativity rules can be overriden with parentheses Copyright 2006 Addison-Wesley. All rights reserved. 1-8 Arithmetic Expressions: Conditional Expressions Conditional Expressions C-based languages (e.g., C, C++) An example: average = (count == 0)? 0 : sum / count Evaluates as if written like if (count == 0) average = 0 else average = sum /count Copyright 2006 Addison-Wesley. All rights reserved. 1-9 Arithmetic Expressions: Operand Evaluation Order Operand evaluation order 1. Variables: fetch the value from memory 2. Constants: sometimes a fetch from memory; sometimes the constant is in the machine language instruction 3. Parenthesized expressions: evaluate all operands and operators first Copyright 2006 Addison-Wesley. All rights reserved. 1-10 Arithmetic Expressions: Potentials for Side Effects Functional side effects: when a function changes a two-way parameter or a non-local variable Problem with functional side effects: When a function referenced in an expression alters another operand of the expression; e.g., for a parameter change: a = 10; /* assume that fun changes its parameter */ b = a + fun(a); //evaluating from left to right or right to left //has different results Copyright 2006 Addison-Wesley. All rights reserved. 1-11 Functional Side Effects Two possible solutions to the problem 1. Write the language definition to disallow functional side effects No two-way parameters in functions No non-local references in functions Advantage: it works! Disadvantage: inflexibility of two-way parameters and non-local references 2. Write the language definition to demand that operand evaluation order be fixed Disadvantage: limits some compiler optimizations Copyright 2006 Addison-Wesley. All rights reserved. 1-12 Overloaded Operators Use of an operator for more than one purpose is called operator overloading Some are common (e.g., + for int and float) Some are potential trouble (e.g., & in C and C++) Loss of compiler error detection (omission of an operand should be a detectable error) Some loss of readability Can be avoided by introduction of new symbols (e.g., Pascal s div for integer division, and / for float-point division) Copyright 2006 Addison-Wesley. All rights reserved. 1-13 Overloaded Operators (continued) C++ and Ada allow user-defined overloaded operators Potential problems: Users can define nonsense operations Readability may suffer, even when the operators make sense Copyright 2006 Addison-Wesley. All rights reserved. 1-14 Type Conversions A narrowing conversion is one that converts an object to a type that cannot include all of the values of the original type e.g., float to int A widening conversion is one in which an object is converted to a type that can include at least approximations to all of the of values the original type e.g., int to float Copyright 2006 Addison-Wesley. All rights reserved. 1-15 Type Conversions: Mixed Mode A mixed-mode expression is one that has operands of different types A coercion is an implicit type conversion Disadvantage of coercions: They decrease in the type error detection ability of the compiler In most languages, all numeric types are coerced in expressions, using widening conversions In Ada, there are virtually no coercions in expressions Copyright 2006 Addison-Wesley. All rights reserved. 1-16 Explicit Type Conversions Explicit Type Conversions Called casting in C-based language Examples C: (int) angle Ada: Float (sum) Note that Ada s syntax is similar to function calls Copyright 2006 Addison-Wesley. All rights reserved. 1-17 Relational and Boolean Expressions Relational Expressions Use relational operators and operands of various types Evaluate to some Boolean representation Operator symbols used vary somewhat among languages C-based == != > < >= <= Copyright 2006 Addison-Wesley. All rights reserved. Fortran 95 .EQ. or == .NE. or <> .GT. Or > .LT. or < .GE. or >= .LE. or <= 1-18 Relational and Boolean Expressions Boolean Expressions Operands are Boolean and the result is Boolean Example operators FORTRAN 77 FORTRAN 90 C Ada .AND. .OR. .NOT. and or not && || ! and or not Copyright 2006 Addison-Wesley. All rights reserved. 1-19 Relational and Boolean Expressions: No Boolean Type in C C has no Boolean type--it uses int type with 0 for false and nonzero for true One odd characteristic of C s expressions: a < b < c is a legal expression, but the result is not what you might expect: Left operator is evaluated, producing 0 or 1 The evaluation result is then compared with the third operand (i.e., c) Copyright 2006 Addison-Wesley. All rights reserved. 1-20 Relational and Boolean Expressions: Operator Precedence Precedence of C-based operators prefix ++, -unary +, -, prefix ++, --, ! *,/,% binary +, <, >, <=, >= =, != && || Copyright 2006 Addison-Wesley. All rights reserved. 1-21 Short Circuit Evaluation An expression in which the result is determined without evaluating all of the operands and/or operators Example: (13*a) * (b/13 1) If a is zero, there is no need to evaluate (b/13-1) Problem with non-short-circuit evaluation index = 1; while (index < listlen) && (LIST[index] != value) index++; When index=listlen, LIST [index] will cause an indexing problem Copyright 2006 Addison-Wesley. All rights reserved. 1-22 Short Circuit Evaluation (continued) C, C++, and Java: use short-circuit evaluation for the usual Boolean operators (&& and ||), but also provide bitwise Boolean operators that are not short circuit (& and |) Ada: programmer can specify either (short-circuit is specified with and then and or else) Short-circuit evaluation exposes the potential problem of side effects in expressions e.g. (a > b) || (b++ / 3) Copyright 2006 Addison-Wesley. All rights reserved. 1-23 Assignment Statements The general syntax <target_var> <assign_operator> <expression> The assignment operator = FORTRAN, BASIC, PL/I, C, C++, Java := ALGOLs, Pascal, Ada = can be bad when it is overloaded for the relational operator for equality Copyright 2006 Addison-Wesley. All rights reserved. 1-24 Assignment Statements: Conditional Targets Conditional targets (C, C++, and Java) (flag)? total : subtotal = 0 Which is equivalent to if (flag) total = 0 else subtotal = 0 Copyright 2006 Addison-Wesley. All rights reserved. 1-25 Assignment Statements: Compound Operators A shorthand method of specifying a commonly needed form of assignment Introduced in ALGOL; adopted by C Example a=a+b is written as a += b Copyright 2006 Addison-Wesley. All rights reserved. 1-26 Assignment Statements: Unary Assignment Operators Unary assignment operators in C-based languages combine increment and decrement operations with assignment Examples sum = ++count (count incremented, added to sum) sum = count++ (count incremented, added to sum) count++ (count incremented) -count++ (count incremented then negated) Copyright 2006 Addison-Wesley. All rights reserved. 1-27 Assignment as an Expression In C, C++, and Java, the assignment statement produces a result and can be used as operands An example: while ((ch = getchar())!= EOF){ } ch = getchar() is carried out; the result (assigned to ch) is used as a conditional value for the while statement Copyright 2006 Addison-Wesley. All rights reserved. 1-28 Mixed-Mode Assignment Assignment statements can also be mixed-mode, for example int a, b; float c; c = a / b; In Pascal, integer variables can be assigned to real variables, but real variables cannot be assigned to integers In Java, only widening assignment coercions are done In Ada, there is no assignment coercion Copyright 2006 Addison-Wesley. All rights reserved. 1-29 Summary Expressions Operator precedence and associativity Operator overloading Mixed-type expressions Various forms of assignment Copyright 2006 Addison-Wesley. All rights reserved. 1-30
Find millions of documents here - Study Guides, Homework Solutions, Papers, Exam Answer Keys and more.
Course Hero has millions of course related materials that will enable you to learn better,
faster and get an A in all your courses.
Below is a small sample set of documents:
Below is a small sample set of documents:
IUPUI >> CSCI >> 355 (Spring, 2008)
IEEE Standard 754 Floating Point Numbers Steve Hollasch / Last update 2005-Feb-24 IEEE Standard 754 floating point is the most common representation today for real numbers on computers, including Intel-based PC\'s, Macintoshes, and most Unix platform...
IUPUI >> CSCI >> 355 (Spring, 2008)
Subscript Bindings and Array Categories In some languages the lower bound of the subscript range is implicit, e.g. C-based languages 0; Fortran 95 1. In some other languages, subscript ranges must be completely specified by the programmer. Copyri...
IUPUI >> CSCI >> 431 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Basic SQL and SQLPlus - Querying using SELECT Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts 1 Relational Data Model RDBMSs are ba...
IUPUI >> CSCI >> N311 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Basic SQL and SQLPlus - Querying using SELECT Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts 1 Relational Data Model RDBMSs are ba...
IUPUI >> CSCI >> 431 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Database Programming Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu 12/17/08 Dale Roberts 1 DataBase Programming Creating a Database Applica...
IUPUI >> CSCI >> N311 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Database Programming Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu 12/17/08 Dale Roberts 1 DataBase Programming Creating a Database Applica...
IUPUI >> CSCI >> 431 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI PL/SQL Introduction Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts PL/SQL Introduction The limits of my language mean the limits o...
IUPUI >> CSCI >> N311 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI PL/SQL Introduction Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts PL/SQL Introduction The limits of my language mean the limits o...
IUPUI >> CSCI >> 431 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Introduction to Relational Databases Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts 1 Sharing Knowledge and Success Oracle is a r...
IUPUI >> CSCI >> N311 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Introduction to Relational Databases Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts 1 Sharing Knowledge and Success Oracle is a r...
IUPUI >> CSCI >> 431 (Fall, 2008)
Introduction to UTL_HTTP and UTL_SMTP Think of the Possibilities! By Mike OMara, TUSC Bradley Brown, TUSC 12/17/08 TUSC, Copyright 2001 1 Developers can no longer be an expert just in a particular tool or product; you must keep abreast of all sor...
IUPUI >> CSCI >> N311 (Fall, 2008)
Introduction to UTL_HTTP and UTL_SMTP Think of the Possibilities! By Mike OMara, TUSC Bradley Brown, TUSC 12/17/08 TUSC, Copyright 2001 1 Developers can no longer be an expert just in a particular tool or product; you must keep abreast of all sor...
IUPUI >> CSCI >> 431 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Data Modeling Introduction and Normalization Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts 1 Sample Table StudentName AdvisorNam...
IUPUI >> CSCI >> N311 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Data Modeling Introduction and Normalization Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts 1 Sample Table StudentName AdvisorNam...
IUPUI >> CSCI >> 431 (Fall, 2008)
CSCI N311 Advanced Database Programming, Oracle Final Project Proposal Purpose All database projects begin with a project proposal to meet some need. The purpose of this assignment is to create a project proposal for your final database project. A co...
IUPUI >> CSCI >> N311 (Fall, 2008)
CSCI N311 Advanced Database Programming, Oracle Final Project Proposal Purpose All database projects begin with a project proposal to meet some need. The purpose of this assignment is to create a project proposal for your final database project. A co...
IUPUI >> CSCI >> 431 (Fall, 2008)
Project 1: Introduction to Oracle SQL*Plus Objectives After completing this lab you should be able to: Login to Oracle running SQL*Plus from Linux Submit a query to the Oracle database Login to Oracle running SQL*Plus from Windows Due for Projec...
IUPUI >> CSCI >> N311 (Fall, 2008)
Project 1: Introduction to Oracle SQL*Plus Objectives After completing this lab you should be able to: Login to Oracle running SQL*Plus from Linux Submit a query to the Oracle database Login to Oracle running SQL*Plus from Windows Due for Projec...
IUPUI >> CSCI >> 431 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Object-Relational Features Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts 1 Object-Relational Databases Types, Object Views, Meth...
IUPUI >> CSCI >> N311 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Object-Relational Features Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts 1 Object-Relational Databases Types, Object Views, Meth...
IUPUI >> CSCI >> 431 (Fall, 2008)
Oracle Database PL/SQL User\'s Guide and Reference 10g Release 2 (10.2) B14261-01 June 2005 Oracle Database PL/SQL Users Guide and Reference 10g Release 2 (10.2) B14261-01 Copyright 1996, 2005, Oracle. All rights reserved. Contributors: Shashaanka ...
IUPUI >> CSCI >> N311 (Fall, 2008)
Oracle Database PL/SQL User\'s Guide and Reference 10g Release 2 (10.2) B14261-01 June 2005 Oracle Database PL/SQL Users Guide and Reference 10g Release 2 (10.2) B14261-01 Copyright 1996, 2005, Oracle. All rights reserved. Contributors: Shashaanka ...
IUPUI >> CSCI >> 431 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI SQL Tuning Introduction Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu 12/17/08 Dale Roberts 1 Oracle Data Dictionary Data Dictionary: store...
IUPUI >> CSCI >> N311 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI SQL Tuning Introduction Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu 12/17/08 Dale Roberts 1 Oracle Data Dictionary Data Dictionary: store...
IUPUI >> CSCI >> 431 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Data Modeling Attributes, Roles, Subclasses, Keys and Weak Entities Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts 1 Attributes on...
IUPUI >> CSCI >> N311 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI Data Modeling Attributes, Roles, Subclasses, Keys and Weak Entities Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts 1 Attributes on...
IUPUI >> CSCI >> 450 (Spring, 2008)
Providing a Philosophical Basis for Ethical Decisions Andrew Olson Copyright 2001. All rights reserved. Contact the author for permission before copying. No permission granted for use in commercial products. All copies must contain this copyright no...
IUPUI >> CSCI >> 450 (Spring, 2008)
Liability in Software Development Andrew Olson Copyright 2001. All rights reserved. Contact the author for permission before copying. No permission granted for use in commercial products. All copies must contain this copyright notice. The issue of ...
IUPUI >> CSCI >> 450 (Spring, 2008)
\"Selected Abstracts Related to Software Quality _ Forum On Risks To The Public In Computers And Related Systems ACM Committee on Computers and Public Policy, Peter G. Neumann, moderator http:/catless.ncl.ac.uk/Risks = Risks Digest, Volume 3, Issue 3...
IUPUI >> CSCI >> 450 (Spring, 2008)
Assignment 1 Due by the beginning of class, September 5, 2001 Create an Engineering Notebook with a ring binder or Ecco-style cover so that you can add and remove pages. Include in it the following information: a. a title page with your name, course...
IUPUI >> CSCI >> 481 (Fall, 2008)
Lingma Acheson Department of Computer and Information Science, IUPUI linglu@iupui.edu 1.1 Motivation: Why data mining? 1.2 What is data mining? 1.3 Data Mining: On what kind of data? 1.4 Data mining functionality: What kinds of Patterns Ca...
IUPUI >> CSCI >> 550 (Fall, 2008)
Rendering Rendering: computing how each pixel of the picture of a scene should look. Shading model (illumination model): method of modeling how lights interact with objects in a scene. Rendering hierarchy: rendering methods using different shading mo...
IUPUI >> CSCI >> 550 (Fall, 2008)
Texture Mapping Enhancing rendering realism by adding surface textures to faces of mesh objects. Texture image: a function f ( s, t ) : [0,1] [0,1] D where D is the color domain. It is often represented as a 2D image (bitmap), but can also be compu...
IUPUI >> CSCI >> 550 (Fall, 2008)
CSCI 550 Interactive Computer Graphics Shiaofen Fang Department of Computer and Information Science Indiana University Purdue University Indianapolis What is computer graphics ? Computer graphics is concerned with Producing pictures using computer. ...
IUPUI >> CSCI >> 550 (Fall, 2008)
CSCI 550 (Fall 2008) Assignment #3 Handout: Monday, Oct. 27, 2008 Due: 1:30pm, Wednesday, Nov. 24, 2008 Non-programming assignments can be either in any format: Word, PDF, plain text or hand-writing. Programming assignments can be submitted either o...
IUPUI >> CSCI >> 550 (Fall, 2008)
2D affine transformations 2D homogeneous coordinates: Point: (x,y,1); vector: (x,y,0) 2D affine transformation: x m11 x\' y \' = T y = m 21 1 0 1 x\' x m11 y \' = T y = m 21 0 0 0 m12 m22 0 m12 m22 0 m13 x m1...
IUPUI >> CSCI >> N100 (Fall, 2008)
Design Concepts: Module A: The Science of Color CSCI N241: Fundamentals of Web Design Copyright 2004 Department of Computer & Information Science Goals Understand the origin of natural color Understand the Additive Color Model Understand the Su...
IUPUI >> CSCI >> N100 (Fall, 2008)
Design Concepts: Module B: Adding Images CSCI N241: Fundamentals of Web Design Copyright 2004 Department of Computer & Information Science Goals Understand how what dithering and gamma are Understand how image compression works Understand how t...
IUPUI >> CSCI >> N201 (Fall, 2008)
Basic History of Computing Al Kwarizmi pascaline Jacquard Loom Lady Ada Babbage Analytical Engine Hollerith Tabulator Zuse Turing Eniac Grace Hopper ...
IUPUI >> INFO >> I112 (Fall, 2008)
Basic History of Computing Al Kwarizmi pascaline Jacquard Loom Lady Ada Babbage Analytical Engine Hollerith Tabulator Zuse Turing Eniac Grace Hopper ...
IUPUI >> CSCI >> N201 (Fall, 2008)
CSCI N100 Principles of Computing Basic Problem-Solving Course Goals Overcome fear of computers Wide range of applications Strong programming skills Whats different about computers? You know lots of machines Computers seem different They seem...
IUPUI >> INFO >> I112 (Fall, 2008)
CSCI N100 Principles of Computing Basic Problem-Solving Course Goals Overcome fear of computers Wide range of applications Strong programming skills Whats different about computers? You know lots of machines Computers seem different They seem...
IUPUI >> CSCI >> N201 (Fall, 2008)
CSCI N201 Programming Concepts and Database 4 History of Programming Languages Lingma Acheson linglu@iupui.edu Department of Computer and Information Science, IUPUI 1 Progression Hardware Machine code Assemblers Compilers Interpreters 2 H...
IUPUI >> CSCI >> N201 (Fall, 2008)
CSCI N201 Programming Concepts and Database 8 Conditions Lingma Acheson linglu@iupui.edu Department of Computer and Information Science, IUPUI 1 Task: Ask the user to input a required integer, and compare the input to the required integer. If i...
IUPUI >> CSCI >> N207 (Fall, 2008)
CSCI N207 Data Analysis Using Spreadsheet S.T.A.I.R Lingma Acheson linglu@iupui.edu Department of Computer and Information Science, IUPUI Problem Solving Technique Fundamental When you get stuck When things go wrong What is STAIR? A problem...
IUPUI >> CSCI >> N305 (Fall, 2008)
Blackbelt Project # 4 Banner 5 points Purpose The purpose of this project is to extend the functionality of the regular banner function to implement a complete character set. Description Extend the functionality of the banner program to display any t...
IUPUI >> CSCI >> N305 (Fall, 2008)
1 1 Introduction to Computers, the Internet and the Web 2007 Pearson Education, Inc. All rights reserved. 2 The chief merit of language is clearness. Galen Our life is frittered away by detail. Simplify, simplify. Henry David Thoreau He had a w...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Introduction to Computers - Languages Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Computer Organization A Typical Von-Neumann Archit...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Characters and Images Dale Roberts, Lecturer IUPUI droberts@cs.iupui.edu Dale Roberts Information Representation Review All information ...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Arrays Declarations Dale Roberts, Lecturer IUPUI droberts@cs.iupui.edu Dale Roberts Arrays Array Group of consecutive memory locations Same name and type, ex: an ar...
IUPUI >> CSCI >> N305 (Fall, 2008)
Character Arrays char string1[] = first; Note : string1 contains 5 characters plus a string termination character or null character \. char string1[] = { f , i , r , s , t , \ }; A String is an array of characters. A character array repr...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Introduction to Computers - Hardware Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu What is a Computer? Computer Device capable of perf...
IUPUI >> CSCI >> N305 (Fall, 2008)
1 11 C File Processing 2007 Pearson Education, Inc. All rights reserved. 2 I read part of it all the way through. Samuel Goldwyn Hats off! The flag is passing by. Henry Holcomb Bennett 2007 Pearson Education, Inc. All rights reserved. 3 Con...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Arrays Multidimensional Arrays Dale Roberts, Lecturer IUPUI droberts@cs.iupui.edu Dale Roberts Multiple subscripted arrays Multiple-Dimensional Arrays Arrays requ...
IUPUI >> CSCI >> N305 (Fall, 2008)
Project # 2 Find-A-Bank 40 points Purpose The learning objective for this project is to use C language conditional statements to choose a bank to finance a loan. Additional experience shall be gained with the software development life cycle: Requirem...
IUPUI >> CSCI >> N305 (Fall, 2008)
Project # 6 Trip Distance Calculator 40 points Purpose The purpose of this project is to gain experience with arrays and looping. Description You are to write a Trip Distance Calculator the calculates the approximate driving distance for a trip the v...
IUPUI >> CSCI >> N305 (Fall, 2008)
1 2 Introduction to C Programming 2007 Pearson Education, Inc. All rights reserved. 2 What\'s in a name? That which we call a rose By any other name would smell as sweet. William Shakespeare Romeo and Juliet When faced with a decision, I always ...
IUPUI >> CSCI >> N305 (Fall, 2008)
CSCI 230 Homework Assignment 4 Appendix D Number Systems 24 Points Deitel Problems D.18, D.19, D.20, D.21, D.22, D.23, D.24, D.25 (3 pts each). ...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Functions Recursion Dale Roberts, Lecturer IUPUI droberts@cs.iupui.edu Dale Roberts Recursion Recursive functions A function can invoke any other function; Can a f...
IUPUI >> CSCI >> N305 (Fall, 2008)
CSCI 230 Blackbelt Project 1 Vending Machine Change Making 5 extra credit points Problem Statement The purpose of this project is to extend Project 1 Change Maker to act as a vending machine. Some of these modification require you to use decision sta...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Program Control - Algorithms Dale Roberts, Lecturer IUPUI droberts@cs.iupui.edu Dale 1 Roberts Algorithms Algorithms is the are part of the problem solving process ...
IUPUI >> CSCI >> N305 (Fall, 2008)
Emacs Command Cheat Sheet Standard Emacs Commands and Command Lines Meta Key on Various Keyboards: Common Abbreviations: M-x means press and then release the Meta key and then press the x key C-x means press and hold the Control key and then press...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Program Control - Additional C Statements Dale Roberts, Lecturer IUPUI droberts@cs.iupui.edu Dale Roberts Outline This Topic Introduces additional repetition contro...
IUPUI >> CSCI >> N305 (Fall, 2008)
...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Functions Scope, Parameter Passing, Storage Specifiers Dale Roberts, Lecturer IUPUI droberts@cs.iupui.edu Dale Roberts 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Arrays Dale Roberts, Lecturer IUPUI droberts@cs.iupui.edu Strings and Parameter Passing Dale Roberts Character Arrays Character arrays String is really a static ar...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI A First C Program Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts Try Your First C Program #include <stdio.h> main() Indicates a { ...
IUPUI >> CSCI >> N305 (Fall, 2008)
Project # 2 Truth-in-Lending Disclosure Statement 5 points Purpose The learning objective for this project is to use C language conditional statements to create a Truth-In-Lending report. Additional experience shall be gained with the software develo...
IUPUI >> CSCI >> N305 (Fall, 2008)
#include <stdio.h> void reverse(char *); int main() { char sentence[ 80 ]; printf(Enter a line of text \ ); gets (sentence); printf(\ The line printed backwards is: \ ); reverse(sentence); printf(\ ); return 0; } 1 void reverse(char *sPtr) { if( sP...
IUPUI >> CSCI >> N305 (Fall, 2008)
Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Structures Functions and Arrays Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts Using Structures With Functions Passing st...
What are you waiting for?