Test Results Schedule Miscellanea Chap. 10 Break Hands on Q & A Conclusion References Files

Size: px
Start display at page:

Download "Test Results Schedule Miscellanea Chap. 10 Break Hands on Q & A Conclusion References Files"

Transcription

1 CSC Computer Science I Lecture #9: Chapter 10 (con t.) Dr. Chuck Cartledge October 19, 2016 at 3:04pm 1/28

2 Table of contents I 1 Test Results 2 Schedule 3 Miscellanea 4 Chap Break 7 Q & A 8 Conclusion 9 References 10 Files 6 Hands on 2/28

3 Histograms Histogram of questions and misses 3/28

4 Histograms Histogram of letter grades Test scores are only part of your final grade. See syllabus. 4/28

5 Histograms Q & A time. The Answer to the Great Question... Of Life, the Universe and Everything... is... forty-two, said Deep Thought, with infinite majesty and calm. Douglas Adams, The Hitchhiker s Guide to the Galaxy 5/28

6 Schedule for the semester: Wk. Date Topic Wk. Date Topic 1 08/22 Chaps /17 Chap /29 Chaps /24 Chaps /05 Chap /31 Chaps /12 Test Chap /07 Test Chap /19 Chap /14 Chap /26 Chap /28 Chap /03 Chap /05 Chap /10 Test Chap /12 Exam Notes: 1 Class canceled due to electrical fire in instructor s home 6/28

7 Programming assignment #004 File Based Address Book Objectives are fairly straightforward: Accept two new commands from the user Commands are: + to add a new contact - to remove all contacts that match a search string Update the data file with new, or removed contacts Submit your source code. This is a single person effort (not a team effort). Due by start of class 26 Oct /28

8 Programming assignment #004 Q & A time. Q: Do you know what the death rate around here is? A: One per person. Now is the time to ask questions. 8/28

9 Corrections and additions since last lecture. Completed grading homework for chapters 7, 8, and 9 Graded exam #002 9/28

10 Test Results Schedule Miscellanea Chap. 10 Break Hands on Q&A Conclusion References Files enums A quick review 1 There are different simple data types 2 typedef is a name substation, not type creation 3 Each type has a different size (see files section) 4 A type s domain is controlled by its size 5 enums are a type, and have limited domain 10/28

11 enums Some basics about enums enums are: 1 A simple variable type 2 You define the domain of values associated with the type 3 The domain values must be globally unique (can be jiggered using namespace tricks) We ll have a hand s on exercise with enums. 4 You can create new variables of your enum type 5 You can use them as pass parameters, return values, loop controls, and in comparisons 11/28

12 enums Creating enums There are a number of different ways to create enum depending on your need. 1 enum TYPE { domain }; enum TimeZones {EASTERN, CENTRAL, MOUNTAIN, PACIFIC}; Creates a new type that can be used where scoping rules permit. 2 enum { domain }; enum {EASTERN, CENTRAL, MOUNTAIN, PACIFIC}; Creates values (nearly like const int) that be used where scoping rules permit. 12/28

13 enums An example of using typed enum Using the enum statement from before: enum TimeZones {EASTERN, CENTRAL, MOUNTAIN, PACIFIC}; We can create a loop like: 13/28

14 structs structs are structured data types A structured data type is a type in which each value is a collection of component items The entire collection has a single name Each component can be accessed individually Used to bundle together related data of various types for convenient access under the same identifier 14/28

15 structs An example Image from [2]. 15/28

16 structs We have created a new User Data Type (UDT) Now that we have created a UDT named AnimalType, we can declare variables of that type: AnimalType thisanimal; AnimalType anotheranimal; These are two totally independent variables, that are made up of other variables. 16/28

17 structs Important things to remember about structs 1 The struct declaration names a type and names the members of the struct 2 It does not allocate memory for any variables of that type! 3 You still need to declare your struct variables 4 Scope of a struct: If the struct type declaration precedes all functions, it will be visible throughout the rest of the file If it is placed within a function, only that function can use it 5 It is common to place struct type declarations in a (.h) header file and #include that file 6 It is possible for members of different struct types to have the same identifiers; 7 Also a non-struct variable may have the same identifier as a structure member 17/28

18 structs How to access struct members? Dot (period) is the member selection operator After the struct type declaration, the various members can be used in your program only when they are preceded by a struct variable name and a dot Image from [1]. 18/28

19 structs Same image. Image from [1]. 19/28

20 structs Examples of accessing struct members. thisanimal.age = 18; thisanimal.id = ; cin >> thisanimal.weight; getline (cin, thisanimal.species); thisanimal.name = giant panda; thisanimal.genus[0] = toupper(thisanimal.genus[0]); thisanimal.age++; 20/28

21 structs There are member operations and aggregate operations A member operation in on a single member of a struct. An aggregate operation is an operation on a data structure as a whole. Including: Assignment to another struct variable of the same type Pass by value, or reference Returned from a function 21/28

22 structs structs can contain other strucks. structs that contain other structs are called: hierarchical structures. (They are also sometimes called nested structures.) All the rules about simple structs apply to hierarchical structs (member operations, aggregate operations, and dot operations) as well. 22/28

23 Break time. Take about 10 minutes. 23/28

24 Practice exercises Programs to load into CodeBlocks and get running: 1 variablesize.cpp find the size of an enum 2 enumio.cpp the program almost works 3 cars.cpp working with structs Others, if you have time. 24/28

25 Q & A time. Q: How many software engineers does it take to change a light bulb? A: None. We ll document it in the manual. 25/28

26 What have we covered? Returned and reviewed test #02 Discussed programming assignment #004 Continued chapter 10 Next time: continue Chapter 10, looking at unions and pointers, and start Chapter 11 26/28

27 References I [1] Richard Smith et al., Working draft, standard for programming language c++, ISO/IEC JTC1/SC22/WG21 document N 4296 (2015). [2] Sylvia Sorkin, Programming and problem solving with c++, Teacher Resource Jones and Barlett Learning, /28

28 Files of interest 1 Fibonacci as a simple lookup 6 Fibonacci as a state machine fibonanci-function-lookup.cpp 2 Fibonacci as a WHILE loop fibonanci-for-loop.cpp 3 Fibonacci as a function call fibonanci-function.cpp 4 Fibonacci as a recursive function fibonanci-recursive-function.cpp fibonanci-statemachine.cpp 7 variablesize.cpp size of different variable types 8 enumio.cpp working with enum types 9 cars.cpp reading and working 5 Fibonacci as a process queue fibonanci-processqueue.cpp with structs 10 cars.dat cars.cpp data file 28/28

Test Results Schedule Miscellanea Control Structs. Add l Oper s Break Hands on Q & A Conclusion References Files

Test Results Schedule Miscellanea Control Structs. Add l Oper s Break Hands on Q & A Conclusion References Files CSC-201 - Computer Science I Lecture #5: Chapter 7 Dr. Chuck Cartledge September 21, 2016 at 9:10am 1/37 Table of contents I 1 Test Results 2 Schedule 3 Miscellanea 4 Control Structs. 5 Add l Oper s 6

More information

Dr. Chuck Cartledge. 7 Nov. 2017

Dr. Chuck Cartledge. 7 Nov. 2017 5.2 5.3 5.4 Chap. 5 review Conclusion References CSC-205 Computer Organization Lecture #012 Sections 5.2 through 5.4, Machine instructions and assemblers Dr. Chuck Cartledge 7 Nov. 2017 1/17 Table of contents

More information

Propedéutico de Programación

Propedéutico de Programación Propedéutico de Programación Coordinación de Ciencias Computacionales 2/13 Material preparado por: Dra. Pilar Gómez Gil Chapter 10 Simple Data Types: Built-In and User-Defined Dale/Weems C++ Simple Data

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

BLM2031 Structured Programming. Zeyneb KURT

BLM2031 Structured Programming. Zeyneb KURT BLM2031 Structured Programming Zeyneb KURT 1 Contact Contact info office : D-219 e-mail zeynebkurt@gmail.com, zeyneb@ce.yildiz.edu.tr When to contact e-mail first, take an appointment What to expect help

More information

The University of Alabama in Huntsville Electrical and Computer Engineering CPE Example of Objective Test Questions for Test 4

The University of Alabama in Huntsville Electrical and Computer Engineering CPE Example of Objective Test Questions for Test 4 The University of Alabama in Huntsville Electrical and Computer Engineering CPE 112 02 Example of Objective Test Questions for Test 4 True or False Name: 1. The statement switch (n) case 8 : alpha++; case

More information

Ch. 10: Name Control

Ch. 10: Name Control Ch. 10: Name Control Static elements from C The static keyword was overloaded in C before people knew what the term overload meant, and C++ has added yet another meaning. The underlying concept with all

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

QUIZ. What are 3 differences between C and C++ const variables?

QUIZ. What are 3 differences between C and C++ const variables? QUIZ What are 3 differences between C and C++ const variables? Solution QUIZ Source: http://stackoverflow.com/questions/17349387/scope-of-macros-in-c Solution The C/C++ preprocessor substitutes mechanically,

More information

Submit your answers to these questions to the Curator under Quizzes as HW08 by the posted due date and time. No late submissions will be accepted.

Submit your answers to these questions to the Curator under Quizzes as HW08 by the posted due date and time. No late submissions will be accepted. Instructions: For all questions, assume that any necessary header files have been included. Submit your answers to these questions to the Curator under Quizzes as HW08 by the posted due date and time.

More information

MPATE-GE 2618: C Programming for Music Technology. Syllabus

MPATE-GE 2618: C Programming for Music Technology. Syllabus MPATE-GE 2618: C Programming for Music Technology Instructor Dr. Schuyler Quackenbush schuyler.quackenbush@nyu.edu Lab Teaching Assistant TBD Description Syllabus MPATE-GE 2618: C Programming for Music

More information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information Laboratory 2: Programming Basics and Variables Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information 3. Comment: a. name your program with extension.c b. use o option to specify

More information

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018 San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018 Course and Contact Information Instructor: Office Location: Telephone: Email: Office Hours:

More information

QUIZ. Source:

QUIZ. Source: QUIZ Source: http://stackoverflow.com/questions/17349387/scope-of-macros-in-c Ch. 4: Data Abstraction The only way to get massive increases in productivity is to leverage off other people s code. That

More information

Tokens, Expressions and Control Structures

Tokens, Expressions and Control Structures 3 Tokens, Expressions and Control Structures Tokens Keywords Identifiers Data types User-defined types Derived types Symbolic constants Declaration of variables Initialization Reference variables Type

More information

CMPE 152 Compiler Design

CMPE 152 Compiler Design San José State University Department of Computer Engineering CMPE 152 Compiler Design Section 1 (Class) Sections 2 and 3 (s) Fall 2018 Course and Contact Information Instructor: Ron Mak Office Location:

More information

CNG 140 C Programming. Syllabus. Course Info Fall Semester. Catalog Description

CNG 140 C Programming. Syllabus. Course Info Fall Semester. Catalog Description CNG 140 C Programming 2012-2013 Fall Semester Syllabus Course Info Catalog Description Advanced programming with C: Storage and control structures, recursion and programming with dynamic data structures.

More information

PESIT-BSC Department of Science & Humanities

PESIT-BSC Department of Science & Humanities LESSON PLAN 15PCD13/23 PROGRAMMING IN C AND DATA Course objectives: STRUCTURES The objective of this course is to make students to learn basic principles of Problem solving, implementing through C programming

More information

COP 3014: Fall Final Study Guide. December 5, You will have an opportunity to earn 15 extra credit points.

COP 3014: Fall Final Study Guide. December 5, You will have an opportunity to earn 15 extra credit points. COP 3014: Fall 2017 Final Study Guide December 5, 2017 The test consists of 1. 15 multiple choice questions - 30 points 2. 2 find the output questions - 20 points 3. 2 code writing questions - 30 points

More information

Deccan Education Society s FERGUSSON COLLEGE, PUNE (AUTONOMOUS) SYLLABUS UNDER AUTONOMY. FIRST YEAR B.Sc. COMPUTER SCIENCE SEMESTER I

Deccan Education Society s FERGUSSON COLLEGE, PUNE (AUTONOMOUS) SYLLABUS UNDER AUTONOMY. FIRST YEAR B.Sc. COMPUTER SCIENCE SEMESTER I Deccan Education Society s FERGUSSON COLLEGE, PUNE (AUTONOMOUS) SYLLABUS UNDER AUTONOMY FIRST YEAR B.Sc. COMPUTER SCIENCE SEMESTER I SYLLABUS OF COMPUTER SCIENCE Academic Year 2016-2017 Deccan Education

More information

Dr. Chuck Cartledge. 15 July 2015

Dr. Chuck Cartledge. 15 July 2015 Miscellanea 6.5 Fun with Fibonacci Break 1.5 Exam Conclusion References CSC-205 Computer Organization Lecture #008 Chapter 6, section 5, Chapter 1, section 5 Dr. Chuck Cartledge 15 July 2015 1/30 Table

More information

San José State University Computer Science CS 122 Advanced Python Programming Spring 2018

San José State University Computer Science CS 122 Advanced Python Programming Spring 2018 Course and Contact Information San José State University Computer Science CS 122 Advanced Python Programming Spring 2018 Instructor: Office Location: Telephone: Email: Office Hours: Class Days/Time: Classroom:

More information

CprE 288 Introduction to Embedded Systems Exam 1 Review. 1

CprE 288 Introduction to Embedded Systems Exam 1 Review.  1 CprE 288 Introduction to Embedded Systems Exam 1 Review http://class.ece.iastate.edu/cpre288 1 Overview of Today s Lecture Announcements Exam 1 Review http://class.ece.iastate.edu/cpre288 2 Announcements

More information

MARKING KEY The University of British Columbia MARKING KEY Computer Science 260 Midterm #2 Examination 12:30 noon, Thursday, March 15, 2012

MARKING KEY The University of British Columbia MARKING KEY Computer Science 260 Midterm #2 Examination 12:30 noon, Thursday, March 15, 2012 MARKING KEY The University of British Columbia MARKING KEY Computer Science 260 Midterm #2 Examination 12:30 noon, Thursday, March 15, 2012 Instructor: K. S. Booth Time: 70 minutes (one hour ten minutes)

More information

Chapter 8: Intraprogram Communication. Lecture 8 1

Chapter 8: Intraprogram Communication. Lecture 8 1 Chapter 8: Intraprogram Communication Lecture 8 1 Topics Storage Types Global and Local Variables Modules and External Variables Typedefs: Renaming Types Review: Functions Pointers to Functions Lecture

More information

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Fall 2017

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Fall 2017 San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Fall 2017 Course and Contact Information Instructor: Office Location: Fabio Di Troia DH282 Telephone:

More information

Computer Science II Lecture 1 Introduction and Background

Computer Science II Lecture 1 Introduction and Background Computer Science II Lecture 1 Introduction and Background Discussion of Syllabus Instructor, TAs, office hours Course web site, http://www.cs.rpi.edu/courses/fall04/cs2, will be up soon Course emphasis,

More information

CMPE 152 Compiler Design

CMPE 152 Compiler Design San José State University Department of Computer Engineering CMPE 152 Compiler Design Course and contact information Instructor: Ron Mak Office Location: ENG 250 Email: Website: Office Hours: Section 4

More information

CSc 2310 Principles of Programming (Java) Jyoti Islam

CSc 2310 Principles of Programming (Java) Jyoti Islam CSc 2310 Principles of Programming (Java) Jyoti Islam Are you in the right class??? Check the CRN of your registration Instructor Jyoti Islam PhD Student, concentration: Machine Learning 4+ years of Industry

More information

Syllabus COSC-051-x - Computer Science I Fall Office Hours: Daily hours will be entered on Course calendar (or by appointment)

Syllabus COSC-051-x - Computer Science I Fall Office Hours: Daily hours will be entered on Course calendar (or by appointment) Syllabus COSC-051-x - Computer Science I Fall 2018 Instructor: Jeremy Bolton, Ph.D. Asst Teaching Professor Department of Computer Science Office: TBD (see Course calendar for office hours) Email: jeremy.bolton@georgetown.edu

More information

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above P.G.TRB - COMPUTER SCIENCE Total Marks : 50 Time : 30 Minutes 1. C was primarily developed as a a)systems programming language b) general purpose language c) data processing language d) none of the above

More information

PIC 10A. Review for Midterm I

PIC 10A. Review for Midterm I PIC 10A Review for Midterm I Midterm I Friday, May 1, 2.00-2.50pm. Try to show up 5 min early so we can start on time. Exam will cover all material up to and including todays lecture. (Only topics that

More information

The New C Standard (Excerpted material)

The New C Standard (Excerpted material) The New C Standard (Excerpted material) An Economic and Cultural Derek M. Jones derek@knosof.co.uk Copyright 2002-2008 Derek M. Jones. All rights reserved. 1456 6.7.2.3 Tags 6.7.2.3 Tags type contents

More information

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, Pilani Pilani Campus Instruction Division. SECOND SEMESTER Course Handout Part II

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, Pilani Pilani Campus Instruction Division. SECOND SEMESTER Course Handout Part II SECOND SEMESTER 2016-2017 Course Handout Part II In addition to part-i (General Handout for all courses appended to the time table) this portion gives further specific details regarding the course. Course

More information

Name Section: M/W or T/TH. True or False (14 Points)

Name Section: M/W or T/TH. True or False (14 Points) Name Section: M/W or T/TH True or False (14 Points) 1. (14 pts) Circle T for true and F for false: T F a) In C++, a function definition should not be nested within another function definition. T F b) Static

More information

3D Graphics Programming Mira Costa High School - Class Syllabus,

3D Graphics Programming Mira Costa High School - Class Syllabus, 3D Graphics Programming Mira Costa High School - Class Syllabus, 2009-2010 INSTRUCTOR: Mr. M. Williams COURSE GOALS and OBJECTIVES: 1 Learn the fundamentals of the Java language including data types and

More information

During the first 2 weeks of class, all students in the course will take an in-lab programming exam. This is the Exam in Programming Proficiency.

During the first 2 weeks of class, all students in the course will take an in-lab programming exam. This is the Exam in Programming Proficiency. Description of CPSC 301: This is a 2-unit credit/no credit course. It is a course taught entirely in lab, and has two required 2-hour 50-minute lab sessions per week. It will review, reinforce, and expand

More information

EEE145 Computer Programming

EEE145 Computer Programming EEE145 Computer Programming Content of Topic 2 Extracted from cpp.gantep.edu.tr Topic 2 Dr. Ahmet BİNGÜL Department of Engineering Physics University of Gaziantep Modifications by Dr. Andrew BEDDALL Department

More information

Computer Programming

Computer Programming Computer Programming Dr. Deepak B Phatak Dr. Supratik Chakraborty Department of Computer Science and Engineering Session: while and do while statements in C++ Dr. Deepak B. Phatak & Dr. Supratik Chakraborty,

More information

CS/SE 153 Concepts of Compiler Design

CS/SE 153 Concepts of Compiler Design San José State University Department of Computer Science CS/SE 153 Concepts of Compiler Design Section 1 Fall 2018 Course and Contact Information Instructor: Ron Mak Office Location: ENG 250 Email: ron.mak@sjsu.edu

More information

CS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square)

CS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square) CS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square) Introduction This semester, through a project split into 3 phases, we are going

More information

APPENDIX A : Example Standard <--Prev page Next page -->

APPENDIX A : Example Standard <--Prev page Next page --> APPENDIX A : Example Standard If you have no time to define your own standards, then this appendix offers you a pre-cooked set. They are deliberately brief, firstly because standards

More information

CSE030 Fall 2012 Final Exam Friday, December 14, PM

CSE030 Fall 2012 Final Exam Friday, December 14, PM CSE030 Fall 2012 Final Exam Friday, December 14, 2012 3-6PM Write your name here and at the top of each page! Name: Select your lab session: Tuesdays Thursdays Paper. If you have any questions or need

More information

Computer Programming

Computer Programming Computer Programming Dr. Deepak B Phatak Dr. Supratik Chakraborty Department of Computer Science and Engineering Session: for statement in C++ Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 1 Quick Recap

More information

Computer Programming

Computer Programming Computer Programming Dr. Deepak B Phatak Dr. Supratik Chakraborty Department of Computer Science and Engineering Session: Structure of a Simple C++ Program Dr. Deepak B. Phatak & Dr. Supratik Chakraborty,

More information

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, PILANI PILANI CAMPUS Instruction Division

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, PILANI PILANI CAMPUS Instruction Division Second Semester 2017-2018 Course Handout (Part II) January08, 2017 In addition to part I (General Handout for all courses appended to the time table) this portion gives further specific details regarding

More information

Practical C++ Programming

Practical C++ Programming SECOND EDITION Practical C++ Programming Steve Oualline O'REILLY' Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo Preface xv Part I. The Basics 1. What Is C++? 3 A Brief History of C++ 3 C++

More information

CS 241 Data Organization using C

CS 241 Data Organization using C CS 241 Data Organization using C Fall 2018 Instructor Name: Dr. Marie Vasek Contact: Private message me on the course Piazza page. Office: Farris 2120 Office Hours: Tuesday 2-4pm and Thursday 9:30-11am

More information

The American University in Cairo Department of Computer Science & Engineering CSCI &09 Dr. KHALIL Exam-I Fall 2011

The American University in Cairo Department of Computer Science & Engineering CSCI &09 Dr. KHALIL Exam-I Fall 2011 The American University in Cairo Department of Computer Science & Engineering CSCI 106-07&09 Dr. KHALIL Exam-I Fall 2011 Last Name :... ID:... First Name:... Form I Section No.: EXAMINATION INSTRUCTIONS

More information

Procedural Programming & Fundamentals of Programming

Procedural Programming & Fundamentals of Programming Procedural Programming & Fundamentals of Programming Lecture 3 - Summer Semester 2018 & Joachim Zumbrägel What we know so far... Data type serves to organize data (in the memory), its possible values,

More information

CMPE 152 Compiler Design

CMPE 152 Compiler Design San José State University Department of Computer Engineering CMPE 152 Compiler Design Section 1 (Class) Sections 2 and 3 (Labs) Spring 2019 Course and Contact Information Instructor: Ron Mak Office Location:

More information

Introduction to Computing Lecture 01: Introduction to C

Introduction to Computing Lecture 01: Introduction to C Introduction to Computing Lecture 01: Introduction to C Assist.Prof.Dr. Nükhet ÖZBEK Ege University Department of Electrical&Electronics Engineering ozbek.nukhet@gmail.com Topics Introduction to C language

More information

CMSC 202 Midterm Exam 1 Fall 2015

CMSC 202 Midterm Exam 1 Fall 2015 1. (15 points) There are six logic or syntax errors in the following program; find five of them. Circle each of the five errors you find and write the line number and correction in the space provided below.

More information

Functions. Lab 4. Introduction: A function : is a collection of statements that are grouped together to perform an operation.

Functions. Lab 4. Introduction: A function : is a collection of statements that are grouped together to perform an operation. Lab 4 Functions Introduction: A function : is a collection of statements that are grouped together to perform an operation. The following is its format: type name ( parameter1, parameter2,...) { statements

More information

About Codefrux While the current trends around the world are based on the internet, mobile and its applications, we try to make the most out of it. As for us, we are a well established IT professionals

More information

UNIVERSITY REGULATIONS

UNIVERSITY REGULATIONS CPSC 221: Algorithms and Data Structures Midterm Exam, 2015 October 21 Name: Student ID: Signature: Section (circle one): MWF(101) TTh(102) You have 90 minutes to solve the 8 problems on this exam. A total

More information

Dr. Chuck Cartledge. 18 Feb. 2015

Dr. Chuck Cartledge. 18 Feb. 2015 CS-495/595 Pig Lecture #6 Dr. Chuck Cartledge 18 Feb. 2015 1/18 Table of contents I 1 Miscellanea 2 The Book 3 Chapter 11 4 Conclusion 5 References 2/18 Corrections and additions since last lecture. Completed

More information

Patterns: Working with Arrays

Patterns: Working with Arrays Steven Zeil October 14, 2013 Outline 1 Static & Dynamic Allocation Static Allocation Dynamic Allocation 2 Partially Filled Arrays Adding Elements Searching for Elements Removing Elements 3 Arrays and Templates

More information

Since we have declared a type, we can define a variable to hold values of this type.

Since we have declared a type, we can define a variable to hold values of this type. 7 STRUCTURES 7.1 Introduction Let us suppose that a person's bank account contains the following details: their account number, their name and the balance left in their account. We can describe these attributes

More information

Basic memory model Using functions Writing functions. Basics Prototypes Parameters Return types Functions and memory Names and namespaces

Basic memory model Using functions Writing functions. Basics Prototypes Parameters Return types Functions and memory Names and namespaces Basic memory model Using functions Writing functions Basics Prototypes Parameters Return types Functions and memory Names and namespaces When a program runs it requires main memory (RAM) space for Program

More information

You must include this cover sheet. Either type up the assignment using theory3.tex, or print out this PDF.

You must include this cover sheet. Either type up the assignment using theory3.tex, or print out this PDF. 15-122 Assignment 3 Page 1 of 12 15-122 : Principles of Imperative Computation Fall 2012 Assignment 3 (Theory Part) Due: Thursday, October 4 at the beginning of lecture. Name: Andrew ID: Recitation: The

More information

Dr. Chuck Cartledge. 24 Oct. 2017

Dr. Chuck Cartledge. 24 Oct. 2017 4.4 Fun with Fibonacci Chap. 4 review Conclusion References Files CSC-205 Computer Organization Lecture #010 Section 4.4, Gates and machine instructions Dr. Chuck Cartledge 24 Oct. 2017 1/19 Table of contents

More information

Fundamentals of Programming. Lecture 12: C Structures, Unions, Bit Manipulations and Enumerations

Fundamentals of Programming. Lecture 12: C Structures, Unions, Bit Manipulations and Enumerations Fundamentals of Programming Lecture 12: C Structures, Unions, Bit Manipulations and Enumerations Instructor: Fatemeh Zamani f_zamani@ce.sharif.edu Sharif University of Technology Computer Engineering Department

More information

Review of the C Programming Language for Principles of Operating Systems

Review of the C Programming Language for Principles of Operating Systems Review of the C Programming Language for Principles of Operating Systems Prof. James L. Frankel Harvard University Version of 7:26 PM 4-Sep-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights

More information

Introduction to C. Sami Ilvonen Petri Nikunen. Oct 6 8, CSC IT Center for Science Ltd, Espoo. int **b1, **b2;

Introduction to C. Sami Ilvonen Petri Nikunen. Oct 6 8, CSC IT Center for Science Ltd, Espoo. int **b1, **b2; Sami Ilvonen Petri Nikunen Introduction to C Oct 6 8, 2015 @ CSC IT Center for Science Ltd, Espoo int **b1, **b2; /* Initialise metadata */ board_1->height = height; board_1->width = width; board_2->height

More information

ECE573 Introduction to Compilers & Translators

ECE573 Introduction to Compilers & Translators ECE573 Introduction to Compilers & Translators Tentative Syllabus Fall 2005 Tu/Th 9:00-10:15 AM, EE 115 Instructor Prof. R. Eigenmann Tel 49-41741 Email eigenman@ecn Office EE334C Office Hours Tu 10:15-11:30

More information

Advanced Programming Concepts. CIS 15 : Spring 2007

Advanced Programming Concepts. CIS 15 : Spring 2007 Advanced Programming Concepts CIS 15 : Spring 2007 Mondays and Thursdays 12:15 pm to 1:30 pm 232 Ingersoll Extension Instructor: Chipp Jansen (not Tennenbaum as listed) E-mail: chipp@sci.brooklyn.cuny.edu

More information

HOUSTON COMMUNITY COLLEGE BUSINESS TECHNOLOGY NORTHEAST COLLEGE-NORTHLINE LOCATION COURSE SYLLABUS FALL 2011 COMPUTER APPLICATION I POFI 1301

HOUSTON COMMUNITY COLLEGE BUSINESS TECHNOLOGY NORTHEAST COLLEGE-NORTHLINE LOCATION COURSE SYLLABUS FALL 2011 COMPUTER APPLICATION I POFI 1301 HOUSTON COMMUNITY COLLEGE BUSINESS TECHNOLOGY NORTHEAST COLLEGE-NORTHLINE LOCATION Instructor: Marva Taylor Room: 313 Phone No: 713-718-8000 Email: marva.taylor@hccs.edu Office Hours: By appointment COURSE

More information

Today's Topics. CISC 458 Winter J.R. Cordy

Today's Topics. CISC 458 Winter J.R. Cordy Today's Topics Last Time Semantics - the meaning of program structures Stack model of expression evaluation, the Expression Stack (ES) Stack model of automatic storage, the Run Stack (RS) Today Managing

More information

BEng (Hons) Electronic Engineering. Resit Examinations for / Semester 1

BEng (Hons) Electronic Engineering. Resit Examinations for / Semester 1 BEng (Hons) Electronic Engineering Cohort: BEE/10B/FT Resit Examinations for 2016-2017 / Semester 1 MODULE: Programming for Engineers MODULE CODE: PROG1114 Duration: 3 Hours Instructions to Candidates:

More information

CSCI 102L - Data Structures Midterm Exam #1 Fall 2011

CSCI 102L - Data Structures Midterm Exam #1 Fall 2011 Print Your Name: Page 1 of 8 Signature: Aludra Loginname: CSCI 102L - Data Structures Midterm Exam #1 Fall 2011 (10:00am - 11:12am, Wednesday, October 5) Instructor: Bill Cheng Problems Problem #1 (24

More information

CPSC 427: Object-Oriented Programming

CPSC 427: Object-Oriented Programming CPSC 427: Object-Oriented Programming Michael J. Fischer Lecture 10 October 1, 2018 CPSC 427, Lecture 10, October 1, 2018 1/20 Brackets Example (continued from lecture 8) Stack class Brackets class Main

More information

CSE 333 Midterm Exam 7/29/13

CSE 333 Midterm Exam 7/29/13 Name There are 5 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. The exam is closed book, closed notes, closed

More information

EL6483: Brief Overview of C Programming Language

EL6483: Brief Overview of C Programming Language EL6483: Brief Overview of C Programming Language EL6483 Spring 2016 EL6483 EL6483: Brief Overview of C Programming Language Spring 2016 1 / 30 Preprocessor macros, Syntax for comments Macro definitions

More information

Computer Department. Question (1): State whether each of the following is true or false. Question (2): Select the correct answer from the following:

Computer Department. Question (1): State whether each of the following is true or false. Question (2): Select the correct answer from the following: Computer Department Program: Computer Midterm Exam Date : 19/11/2016 Major: Information & communication technology 1 st Semester Time : 1 hr (10:00 11:00) Course: Introduction to Programming 2016/2017

More information

CIS 130 Exam #2 Review Suggestions

CIS 130 Exam #2 Review Suggestions CIS 130 - Exam #2 Review Suggestions p. 1 * last modified: 11-11-05, 12:32 am CIS 130 Exam #2 Review Suggestions * remember: YOU ARE RESPONSIBLE for course reading, lectures/labs, and especially anything

More information

Hrs Hrs Hrs Hrs Hrs Marks Marks Marks Marks Marks

Hrs Hrs Hrs Hrs Hrs Marks Marks Marks Marks Marks Subject Code: CC103-N Subject Title: FUNDAMENTALS OF PROGRAMMING Teaching scheme Total L T P Total Theory Credit Evaluation Scheme Mid Sem Exam CIA Pract. Total Hrs Hrs Hrs Hrs Hrs Marks Marks Marks Marks

More information

CS 502 Introduction to Operating Systems. Fall 98 Waltham Campus

CS 502 Introduction to Operating Systems. Fall 98 Waltham Campus CS 502 Introduction to Operating Systems Fall 98 Waltham Campus Operating Systems Introduction Outline Course Introduction Administration Major components Homework Research Paper Presentation Exams Project

More information

Linked lists Tutorial 5b

Linked lists Tutorial 5b Linked lists Tutorial 5b Katja Mankinen 6 October 2017 Aim Pointers are one of the most powerful tools in C++: with pointers, you can directly manipulate computer memory. However, at first glance they

More information

About this exam review

About this exam review Final Exam Review About this exam review I ve prepared an outline of the material covered in class May not be totally complete! Exam may ask about things that were covered in class but not in this review

More information

KOM3191 Object Oriented Programming Dr Muharrem Mercimek OPERATOR OVERLOADING. KOM3191 Object-Oriented Programming

KOM3191 Object Oriented Programming Dr Muharrem Mercimek OPERATOR OVERLOADING. KOM3191 Object-Oriented Programming KOM3191 Object Oriented Programming Dr Muharrem Mercimek 1 OPERATOR OVERLOADING KOM3191 Object-Oriented Programming KOM3191 Object Oriented Programming Dr Muharrem Mercimek 2 Dynamic Memory Management

More information

CSC 148 Lecture 3. Dynamic Typing, Scoping, and Namespaces. Recursion

CSC 148 Lecture 3. Dynamic Typing, Scoping, and Namespaces. Recursion CSC 148 Lecture 3 Dynamic Typing, Scoping, and Namespaces Recursion Announcements Python Ramp Up Session Monday June 1st, 1 5pm. BA3195 This will be a more detailed introduction to the Python language

More information

Review of the C Programming Language

Review of the C Programming Language Review of the C Programming Language Prof. James L. Frankel Harvard University Version of 11:55 AM 22-Apr-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights reserved. Reference Manual for the

More information

C Programming SYLLABUS COVERAGE SYLLABUS IN DETAILS

C Programming SYLLABUS COVERAGE SYLLABUS IN DETAILS C Programming C SYLLABUS COVERAGE Introduction to Programming Fundamentals in C Operators and Expressions Data types Input-Output Library Functions Control statements Function Storage class Pointer Pointer

More information

Pointers. Addresses in Memory. Exam 1 on July 18, :00-11:40am

Pointers. Addresses in Memory. Exam 1 on July 18, :00-11:40am Exam 1 on July 18, 2005 10:00-11:40am Pointers Addresses in Memory When a variable is declared, enough memory to hold a value of that type is allocated for it at an unused memory location. This is the

More information

CSC 4710 / CSC 6710 Database Systems. Rao Casturi

CSC 4710 / CSC 6710 Database Systems. Rao Casturi CSC 4710 / CSC 6710 Database Systems Rao Casturi Introduction About me Education B.E (Electronics & Communications) M.S (Computer Science) Working towards Ph.D. Professional work experience 25+ Years in

More information

BCIS 3630 Dr. GUYNES SPRING 2018 TUESDAY SECTION [JAN version] GRADER COURSE WEBSITE

BCIS 3630 Dr. GUYNES SPRING 2018 TUESDAY SECTION [JAN version] GRADER   COURSE WEBSITE COURSE WEBSITE http://www.steveguynes.com/bcis3630/bcis3630/default.html Instructor: Dr. Guynes Office: BLB 312H Phone: (940) 565-3110 Office Hours: By Email Email: steve.guynes@unt.edu TEXTBOOK: Starting

More information

CS 137 Part 5. Pointers, Arrays, Malloc, Variable Sized Arrays, Vectors. October 25th, 2017

CS 137 Part 5. Pointers, Arrays, Malloc, Variable Sized Arrays, Vectors. October 25th, 2017 CS 137 Part 5 Pointers, Arrays, Malloc, Variable Sized Arrays, Vectors October 25th, 2017 Exam Wrapper Silently answer the following questions on paper (for yourself) Do you think that the problems on

More information

Computer System and programming in C

Computer System and programming in C Computer System and programming in C 1 C structures: aggregate, yet scalar aggregate in that they hold multiple data items at one time named members hold data items of various types like the notion of

More information

About this Course. Blackboard Student Orientation Course. About the Portal. Logging In. About the Course Layout. Showing the Course Menu

About this Course. Blackboard Student Orientation Course. About the Portal. Logging In. About the Course Layout. Showing the Course Menu About this Course Blackboard Student Orientation Course Outline and Notes 1 Your progress is automatically saved Most slides follow a Read > Watch > Do structure Click the to close the Information Box

More information

EECE.2160: ECE Application Programming Spring 2019

EECE.2160: ECE Application Programming Spring 2019 Course Meetings Section 201: MWF 8-8:50, Kitson 305 Section 202: MWF 12-12:50, Kitson 305 Course Website Main page: http://mjgeiger.github.io/eece2160/sp19/ Schedule: http://mjgeiger.github.io/eece2160/sp19/schedule.htm

More information

CS 240 Fall 2015 Section 004. Alvin Chao, Professor

CS 240 Fall 2015 Section 004. Alvin Chao, Professor CS 240 Fall 2015 Section 004 Alvin Chao, Professor Today Course overview Data Structures / Algorithms Course policies The C language Motivation Computers are digital Data is stored in binary format (1's

More information

SULTAN QABOOS UNIVERSITY COURSE OUTLINE PROGRAM: BSc. in Computer Science. Laboratory (Practical) Field or Work Placement

SULTAN QABOOS UNIVERSITY COURSE OUTLINE PROGRAM: BSc. in Computer Science. Laboratory (Practical) Field or Work Placement SULTAN QABOOS UNIVERSITY COURSE OUTLINE PROGRAM: BSc. in Computer Science 1. Course Code COMP2102 2. Course Title Problem Solving and Programming 3. Credits 3 4. Pre-requisite Course(s) COMP2101 5. Co-requisite

More information

: Principles of Imperative Computation. Summer Assignment 4. Due: Monday, June 11, 2012 in class

: Principles of Imperative Computation. Summer Assignment 4. Due: Monday, June 11, 2012 in class 15-122 Assignment 4 Page 1 of 8 15-122 : Principles of Imperative Computation Summer 1 2012 Assignment 4 (Theory Part) Due: Monday, June 11, 2012 in class Name: Andrew ID: Recitation: The written portion

More information

Programming. C++ Basics

Programming. C++ Basics Programming C++ Basics Introduction to C++ C is a programming language developed in the 1970s with the UNIX operating system C programs are efficient and portable across different hardware platforms C++

More information

This handbook contains directions on using tools and resources in WebAccess at CSM.

This handbook contains directions on using tools and resources in WebAccess at CSM. WebAccess Handbook This handbook contains directions on using tools and resources in WebAccess at CSM. Contents Logging in to WebAccess... 2 Setting up your Shell... 3 Docking Blocks or Menus... 3 Course

More information

MARKING KEY The University of British Columbia MARKING KEY Computer Science 260 Midterm #1 Examination 12:30 noon, Tuesday, February 14, 2012

MARKING KEY The University of British Columbia MARKING KEY Computer Science 260 Midterm #1 Examination 12:30 noon, Tuesday, February 14, 2012 MARKING KEY The University of British Columbia MARKING KEY Computer Science 260 Midterm #1 Examination 12:30 noon, Tuesday, February 14, 2012 Instructor: K. S. Booth Time: 70 minutes (one hour ten minutes)

More information

Dr. Chuck Cartledge. 3 June 2015

Dr. Chuck Cartledge. 3 June 2015 Miscellanea 8224 Revisited Break 1.5 1.6 Conclusion References Backup slides CSC-205 Computer Organization Lecture #002 Section 1.5 Dr. Chuck Cartledge 3 June 2015 1/30 Table of contents I 5 1.6 1 Miscellanea

More information

THE UNIVERSITY OF TEXAS AT AUSTIN MIS373 e-discovery and Digital Forensics SPRING 2015 Unique#: (03883) VERSION: 1/23/2015

THE UNIVERSITY OF TEXAS AT AUSTIN MIS373 e-discovery and Digital Forensics SPRING 2015 Unique#: (03883) VERSION: 1/23/2015 THE UNIVERSITY OF TEXAS AT AUSTIN MIS373 e-discovery and SPRING 2015 Unique#: (03883) VERSION: 1/23/2015 Instructor : Juan Reyes, Lecturer Class times : Monday and Wednesday, 3:30-5:00pm Class location

More information

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++ Introduction to Programming in C++ Course Text Programming in C++, Zyante, Fall 2013 edition. Course book provided along with the course. Course Description This course introduces programming in C++ and

More information