IMPORTANT REMINDERS. Code-packaging info for your tar file. Other reminders, FYI

Size: px
Start display at page:

Download "IMPORTANT REMINDERS. Code-packaging info for your tar file. Other reminders, FYI"

Transcription

1 Carnegie Mellon University Multimedia Databases and Data Mining Spring 2016, C. Faloutsos Homework 2 Due Date: Feb. 3, 3:00pm, in class Designed by: Di Jin. IMPORTANT REMINDERS All homeworks are to be done INDIVIDUALLY. All written answers should be TYPED. For each question, we expect both a hard copy, as specified per question, as well as a tar file with your code - see details next, on how to package your code. Code-packaging info for your tar file Submit your code to blackboard, in a single tar file, called andrewid-hw2.tar.gz. For your convenience, we provide a tar-file package, at courses/826.s16/homeworks/hw2/christos-hw2.tar.gz. It has 4 directories /Q1, /Q2, /Q3, /Q4, the k-d-tree and R-tree source code, and place-holder code. TO DO: tar xvfz christos-hw2.tar.gz; cd Q1; make # to work on kdtrees Replace the place-holder code with your solutions, tar everything into andrewid-hw2.tar.gz and submit to blackboard. Hints: Please explore the makefiles we have created, for your convenience. For example, from the top directory: make hw2 will run the code for all 4 questions make package will try create the tar-file, for submission make spotless will clean up all the derived files (*.o, etc) Reminders: Make sure that you 1. exclude redundant/derived files, in your tar-file 2. test your tar file (tar xvf; make hw2), to check for omitted files. Other reminders, FYI Expected effort for this homework: total of hours ( 4-8 hours per question). Weight: 30% of total homeworks weight = 3% of course weight. 1

2 Q1 KD-Trees [40pts] Print answers on separate page, with [course-id] [hw#] [question#] [andrew-id] [your name] Grading info: graded by Varshaa Naganathan Problem Description: Consider the k-d-tree package, in C, in the directory./q1 of the provided tar-file package. We want to add the range-knn query, with parameters k and r, which is an extension of the nearest-neighbor query: it should return the k nearest neighbors, as long as they are within radius r. If the tree has fewer than k qualifying nodes then we should return all the nodes, with a warning: only <number> nodes found. Input Format: We will use m as the code for the new query (since n is taken, for the nearest-neighbor query). For your coding convenience, we will fix k=5, and r= Thus, the query need only specify the d coordinates of the query point, for example, for a d=3 (ie., 3-dimensional setting), the lines m should return (at most) k=5 neighbors, as long as they are within r=0.002 from the query point (0.8, 0.8, 0.8). In fact, this is one of the queries in the included file 3d-input.txt. 1. [10 pt] Augment the provided kdtree code, to handle such range-knn queries, with k = 5 nearest neighbors within the range of r = [10 pt] Testing: We plan to test your code ourselves, on several secret settings (which, of course, we ll publish after the due date). Thus, test your code, for several other settings, of your design, to cover corner cases. Grading info: -2 for every wrong output 3. [20 pt] a hard copy of the output of your code, on the two included input scripts (2d-input.txt, 3d-input.txt; they are in the./q1 directory). In your output, keep only the lines that are the result of the range-knn queries, to save paper. (Hint: try grep -v ). For your convenience, try our makefile: make hw2 currently prints implement me, instead of the actual answer. Grading info: -2 for every wrong output What to turn in: Code: Submit your code to blackboard, in the./q1 directory of your tar.gz file. (Typing make hw2 should print your responses to the two input files, i.e., 2d-input.txt and 3d-input.txt.). Answers: Submit hard copy for 1. your code for Q the output of your code on the two input files 2

3 Solution: kdtree.c void mnnsearch (TREENODE subroot, VECTOR vp, int count ){ VECTOR best ; VECTOR bestarr [ count ] ; //#i f d e f DEBUG p r i n t f ( mnn t r e e search was c a l l e d with \n ) ; v e c p r i n t ( vp ) ; //#e n d i f int k ; int nodecounter = 0 ; int emptynodeflag = 0 ; for ( k=0;k<count ; k++) { best = rnnsearch ( subroot, vp, (VECTOR )NULL, 0 ) ; i f ( best!= NULL){ best >f l a g = TRUE; nodecounter += 1 ; else { emptynodeflag = 1 ; bestarr [ k ] = best ; for ( k=0;k<count ; k++) { best = bestarr [ k ] ; i f ( best!= NULL){ i f ( myvecdist2 ( best, vp ) < 0.002){ p r i n t f ( n e a r e s t neighbor %d :, k+1); v e c p r i n t ( best ) ; i f ( emptynodeflag==1){ p r i n t f ( Warning : only %d nodes found. \ n, nodecounter ) ; for ( k=0;k<count ; k++) { i f ( bestarr [ k ]!= NULL){ bestarr [ k] > f l a g = FALSE; 3

4 Solution: main.c case m : p r i n t f ( 5 nn with i n f i n i t y norm s e a r c h i n g... \ n ) ; count = 5 ; for ( i =0; i<numdims ; i ++){ p r i n t f ( %d th a t t r. value=, i ) ; s c a n f ( %l f, &val ) ; #i f d e f DEBUG p r i n t f ( %f \n, val ) ; #e n d i f vecput ( inputvectorptr, i, val ) ; #i f d e f DEBUG p r i n t f ( \ t \ t f o r %d nn\n, count ) ; #e n d i f p r i n t f ( nn s e a r c h i n g query point : ) ; v e c p r i n t ( inputvectorptr ) ; mnnsearch ( root, inputvectorptr, count ) ; break ; Solution: vector.c VECTOR v e c a l l o c ( VECTOR pvec ; int i ; int n){ a s s e r t ( n > 0 ) ; pvec = (VECTOR ) malloc ( sizeof (VECTOR) ) ; a s s e r t ( pvec!= NULL ) ; pvec > vec = (NUMBER ) malloc ( sizeof (NUMBER) n ) ; a s s e r t ( ( pvec >vec )!= NULL ) ; pvec >l e n = n ; / i n i t i a l i z e v e c t o r to z e r o s 2/7/97 / for ( i =0; i<n ; i ++){ ( pvec >vec ) [ i ] = (NUMBER) 0. 0 ; / i n i t i a l i z e f l a g to FALSE / pvec >f l a g = FALSE; return ( pvec ) ; 4

5 Q2 Z-order in mirrors [20pts] Print answers on separate page, with [course-id] [hw#] [question#] [andrew-id] [your name] Grading info: graded by Varshaa Naganathan Problem Description: A complete 2-dimension z order curve is centrosymmetric, where the center is the center of the whole plot (illustrated in Fig. 4). That is, if we rotate the curve by 180 degrees around its center, it will retain its shape. The mirror of point p is the point q, that p ends up landing, after such a rotation. In this problem, you will write the code to compute the (x,y) coordinates of the mirror point q, given the z-value of the point p. The command-line syntax should be: zmirror2 -n <order-of-curve> -i <integer> Thus: zmirror2 -n 2 -i 0 # should return 3 3 zmirror2 -n 3 -i 0 # should return see two blue squares in Figure 4 zmirror2 -n 3 -i 63 # should return 0 0 zmirror2 -n 3 -i 1 # should return 7 6 Figure 1: Examples of mirror pairs. The two blue squares are mirrors; and so are the two green crosses. The * marks the center of rotation. The weights are as follows: 1. [10 pt] Code: your zmirror2 should match the specifications. 2. [5 pt] Output: Give the results of your program on the input files./q2/q2.input.txt. Make sure you echo the input, so that it is clear which answer refers to which input. Grading info: -1 for x and y interchanged 5

6 3. [5 pt] Plot: Using your programs, write code to plot a z-curve of order 6 (64 * 64 grid) and dimension 2. For plotting, try gnuplot, as in the provided tar-file package. Hint: Make your code robust and guard against all the corner cases. E.g. negative coordinates, non-integer input, coordinates out of range, etc. For Q2.3, you could loop over the appropriate integers 0, 1,... and invoke your zmirror2 functionality. What to turn in: Code: Check the provided tar-file package, under directory./q2; replace the placeholder zmirror2.c, modify the makefile if necessary; and deliver 1. your code for Q2.1, 2. and Q2.3 Typing make hw2 should print your responses to the input files, and generate the plots for the z-curve. Answers: Hard copy of 1. your code for Q your code for Q2.2, 3. your output for Q2.2, 4. and your plot for Q2.3. 6

7 Solution: zmirror2.c #include zorder. h #include u t i l. h int main ( int argc, char argv ){ unsigned int x, y ; i f ( validargs ( argc, argv )!= 1){ p r i n t f ( Arguments e r r o r \n ) ; return 0 ; int input, order, max, mirror ; order = a t o i ( argv [ 2 ] ) ; input = a t o i ( argv [ 4 ] ) ; max = ( int )pow (2, order 2 ) ; mirror = (max 1) input ; i z o r d e r ( mirror, &x, &y ) ; p r i n t f ( %d %d\n, x, y ) ; return 0 ; 7

8 Solution: zorder.h #include <s t d i o. h> #include <math. h> #include <s t d l i b. h> #include <s t r i n g. h> int validargs ( int argc, char argv ) ; int unpart1by1 ( unsigned int n ) ; void i z o r d e r ( unsigned int z, unsigned int x, unsigned int y ) ; int checkcoor ( int input, int order ) ; int validargs ( int argc, char argv ){ i f ( argc!= 5){ return 1; int input = a t o i ( argv [ 4 ] ) ; int order = a t o i ( argv [ 2 ] ) ; i f ( checkcoor ( input, order ) < 0){ return 1; return 1 ; int unpart1by1 ( unsigned int n){ n&= 0 x ; n = (n ˆ ( n >> 1 ) ) & 0 x ; n = (n ˆ ( n >> 2 ) ) & 0 x 0 f 0 f 0 f 0 f ; n = (n ˆ ( n >> 4 ) ) & 0 x 0 0 f f 0 0 f f ; n = (n ˆ ( n >> 8 ) ) & 0 x f f f f ; return n ; void i z o r d e r ( unsigned int z, unsigned int x, unsigned int y ){ x = unpart1by1 ( z >> 1 ) ; y = unpart1by1 ( z ) ; 8

9 Solution: output for the input.txt./zmirror2 -n 3 -i 2 gives 6 7./zmirror2 -n 4 -i 6 gives /zmirror2 -n 5 -i 28 gives /zmirror2 -n 6 -i 4 gives /zmirror2 -n 6 -i 25 gives /zmirror2 -n 6 -i 40 gives Figure 2: Solution to the z-curve of order 6 (64 * 64 grid) and dimension 2 9

10 Q3 Hilbert Curve Plotting [10pts] Print answers on separate page, with [course-id] [hw#] [question#] [andrew-id] [your name] Grading info: graded by Zhoucheng Li Problem Description: The goal is to become familiar with Hilbert curves. We want code, to plot the Hilbert curve of order n. That is, hcurve -n 3 should plot Fig. 3(b), the Hilbert curve for the 8x8 grid. The output should be a.png file, like the one included in the tar-file package, under./q3 (a) Hilbert curve with order 2 (b) Hilbert curve with order 3 Figure 3: Hilbert curve examples Write programs to achieve the requirements; hand in your source code on hard copy; and submit your source code to blackboard. Weight distribution: 1. [5 pt] For your code, in C/C++. Grading info: -1 if order argument is hard coded -1 if there is tiny bug or logic error in code -5 if code is not attached -5 if code couldn t run 2. [5 pt] For the plot of a Hilbert curve of order 6 (64 * 64 grid) in 2-d. Again, we recommend gnuplot, but anything else that runs on the linux/andrew machines, is fine. Grading info: -1 if the graph has tiny error (e.g. part of the graph is out of box, is missing etc) -5 if the graph is not Hilber Curving plot to- 4 depends on the how the graph is close to answer Hint: For Hilbert curve, we recommend the code/algorithm from the following papers ( either one is fine - click on the citations, to get their pdf). Jagadish [SIGMOD 90] Roseman+ [PODS 89] 10

11 What to turn in: Code: Put your code for Q3.1 and Q3.2, under the directory./q3, replacing the placeholders we provide. Typing make hw2 should print the Hilbert curve of the specified order. Answers: Hard copy of 1. your code for Q your code Q and your plot for Q

12 Solution: horder.h #include <s t d i o. h> #include <math. h> #include <s t d l i b. h> #include <s t r i n g. h> int hcurve ; void r o t a t e ( int n, int x, int y, int rx, int ry ) ; int validargs ( int argc, char argv ) ; int checkcoor ( int coor, int order ) ; int validargs ( int argc, char argv ){ i f ( argc!= 5){ return 1; int input = a t o i ( argv [ 4 ] ) ; int order = a t o i ( argv [ 2 ] ) ; i f ( checkcoor ( input, order ) < 0){ return 1; return 1 ; void r o t a t e ( int n, int x, int y, int rx, int ry ) { i f ( ry == 0) { i f ( rx == 1) { x = n 1 x ; y = n 1 y ; int t = x ; x = y ; y = t ; void i h o r d e r ( int n, int d, int x, int y ) { int rx, ry, s, t=d ; x = y = 0 ; for ( s =1; s<n ; s =2) { rx = 1 & ( t / 2 ) ; ry = 1 & ( t ˆ rx ) ; r o t a t e ( s, x, y, rx, ry ) ; x += s rx ; y += s ry ; 12 t /= 4 ;

13 Solution: hmirror2.c #include horder. h #include u t i l. h int main ( int argc, char argv ) { i f ( validargs ( argc, argv )!= 1) { p r i n t f ( Argument e r r o r \n ) ; return 0 ; int x, y ; int input, order, max, mirror ; order = a t o i ( argv [ 2 ] ) ; input = a t o i ( argv [ 4 ] ) ; max = ( int )pow (2, order 2 ) ; mirror = (max 1) input ; i h o r d e r (1<<order, mirror, &x, &y ) ; p r i n t f ( %d %d\n, x, y ) ; return 0 ; Solution: hplot.sh #! / bin / bash input=$1 outputfile= hpoint. dat max=$ ( ( 2 ( input 2) 1)) rm ${ outputfile for i in seq 0 1 ${max ; do # echo e $ i. / hmirror2 n ${ input i $ i >> ${ outputfile done 13

14 Figure 4: Solution to the h-curve of order 6 (64 * 64 grid) and dimension 2 Q4 R-Tree [30 pts] Print answers on separate page, with [course-id] [hw#] [question#] [andrew-id] [your name] Grading info: graded by Zhoucheng Li Problem Description: The goal is to become familiar with the R-Tree algorithm. Your task is to add new functionality to the provided R-Tree package, called DRTREE 1. The package is in the./q4 directory of the provided tar-file package. Build the R-Tree package with tar -xvf christos-hw2.tar.gz; cd Q4/DRTree; make demo This creates the bin/drmain program. Run it on some small datasets and have some fun! It has been tested on the Unix/linux platform on the andrew machines - it should also run under mac-osx, and probably under Cygwin on Windows. Running make hw2 should load the appropriate dataset, and print the Implement me message. Currently the R-tree package supports s for range search, i for insertion and so on; use the -h flag, to list all the options. Implementation Details: You are required to implement the command t: 1 FYI, D stands for deferred split R-tree - but you don t need to worry about that. t 14

15 for intersection-join, using the input dataset input.hw2 (which is invoked by default with make hw2). This is a special case of the spatial join that we mentioned in class. Your code should work for any dimensionality d (d = 1, 2, 3,... ). The goal of this functionality is to return all pairs of overlapping data rectangles (one pair per line), and their count. Hint: Do explore the range query functions in the code package. Modify or follow the code to implement your own functionality. For the final results, run make spotless before you run make hw2 to clear the index file. With respect to the definition of overlap, re-use the function DRrectOverlap(), that is already in the DRTREE package. Of course, you should test your code for higher (and lower) dimensions, for corner cases (eg., empty tree), etc. Input Format: A line with just t should return all the pairs of intersecting rectangles, and the count N of such pairs. Do not report self-pairs and mirror pairs. That is, if rectangle R1 intersects rectangle R2, report only (R1, R2), omitting (R1, R1), (R2,R1) and (R2,R2). Output Format: Your program should print the total number N of qualifying pairs on the first (or last) line, and then, N lines, one for each pair of qualifying data rectangles (record number)) in tab-separated (tsv) format. Remember to omit self-pairs and mirror pairs. What to turn in: Code: [20 pts] In the provided tar-file package, work in the directory./q4 and implement the specified functionality. We will grade it using the commands: tar -xvfz yourandewid-hw2.tar.gz; cd Q4/DRTREE; make hw2 That is, typing in make hw2, we should produce your answers. We will also test on additional secret datasets, which we ll publish with the rest of the solutions. Grading info: -1 if handin format is not yourandewid-hw2.tar.gz -5 if code is not attached -5 if code fails to pass secret test -5 if code has minor bugs (e.g. the result is close to expected value) -10 if code has major bugs (e.g. the result drifts from expected value too much) Answers: [10 pts] On hard copy, submit 15

16 1. the function(s) you wrote (not the whole package), and 2. Only the number N of output lines (i.e., the count of qualifying pairs) when running make hw2. Grading info: - 5 if the result is close to expected value -10 if the result is far away from expected value (e.g 390, ,.. etc) Solution: Number of output lines: Code: refer to the tar file. 16

Carnegie Mellon University Multimedia Databases and Data Mining Fall 2013, C. Faloutsos Homework 1 Solutions Prepared by: Seunghak Lee

Carnegie Mellon University Multimedia Databases and Data Mining Fall 2013, C. Faloutsos Homework 1 Solutions Prepared by: Seunghak Lee Carnegie Mellon University 15-826 Multimedia Databases and Data Mining Fall 2013, C. Faloutsos Homework 1 Solutions Prepared by: Seunghak Lee Q1 DBMS and SQL [30pts] Problem Description: For each question

More information

Carnegie Mellon University Department of Computer Science /615 - Database Applications C. Faloutsos & A. Pavlo, Fall 2015

Carnegie Mellon University Department of Computer Science /615 - Database Applications C. Faloutsos & A. Pavlo, Fall 2015 Carnegie Mellon University Department of Computer Science 15-415/615 - Database Applications C. Faloutsos & A. Pavlo, Fall 2015 Homework 3 (by Anna Etzel) Due: hard and e-copy at 3:00pm, on Wednesday,

More information

Carnegie Mellon University Database Applications Fall 2009, Faloutsos Assignment 5: Indexing (DB-internals) Due: 10/8, 1:30pm, only

Carnegie Mellon University Database Applications Fall 2009, Faloutsos Assignment 5: Indexing (DB-internals) Due: 10/8, 1:30pm,  only Carnegie Mellon University 15-415 - Database Applications Fall 2009, Faloutsos Assignment 5: Indexing (DB-internals) Due: 10/8, 1:30pm, e-mail only 1 Reminders Weight: 20% of the homework grade. Out of

More information

NOTE: Your grade will be based on the correctness, efficiency and clarity.

NOTE: Your grade will be based on the correctness, efficiency and clarity. THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Department of Computer Science COMP328: Machine Learning Fall 2006 Assignment 2 Due Date and Time: November 14 (Tue) 2006, 1:00pm. NOTE: Your grade will

More information

CAAM 420 Daily Note. Scriber: Qijia Jiang. Date: Oct.16. Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise.

CAAM 420 Daily Note. Scriber: Qijia Jiang. Date: Oct.16. Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise. CAAM 420 Daily Note Scriber: Qijia Jiang Date: Oct.16 1 Announcement Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise. 2 Make Convention Make syntax for library directories and library

More information

cc -o build/test_translate build/test_translate.o b... $

cc -o build/test_translate build/test_translate.o b... $ EECS 211 Homework 2 Winter 2019 Due: Partners: January 24, 2019 at 11:59 PM No; must be completed by yourself Purpose The goal of this assignment is to get you programming with strings, iteration, and

More information

Project 5 (Kd-Trees) Clarifications and Hints 1 / 14

Project 5 (Kd-Trees) Clarifications and Hints 1 / 14 Project 5 (Kd-Trees) Clarifications and Hints 1 / 14 Prologue Project goal: create a symbol table data type whose keys are two-dimensional points The zip file (http://www.swamiiyer.net/cs210/project5.zip)

More information

CS210 Project 5 (Kd-Trees) Swami Iyer

CS210 Project 5 (Kd-Trees) Swami Iyer The purpose of this assignment is to create a symbol table data type whose keys are two-dimensional points. We ll use a 2d-tree to support efficient range search (find all the points contained in a query

More information

Project 1: Convex hulls and line segment intersection

Project 1: Convex hulls and line segment intersection MCS 481 / David Dumas / Spring 2014 Project 1: Convex hulls and line segment intersection Due at 10am on Monday, February 10 0. Prerequisites For this project it is expected that you already have CGAL

More information

CS61C Machine Structures. Lecture 3 Introduction to the C Programming Language. 1/23/2006 John Wawrzynek. www-inst.eecs.berkeley.

CS61C Machine Structures. Lecture 3 Introduction to the C Programming Language. 1/23/2006 John Wawrzynek. www-inst.eecs.berkeley. CS61C Machine Structures Lecture 3 Introduction to the C Programming Language 1/23/2006 John Wawrzynek (www.cs.berkeley.edu/~johnw) www-inst.eecs.berkeley.edu/~cs61c/ CS 61C L03 Introduction to C (1) Administrivia

More information

Carnegie Mellon University Department of Computer Science /615 - Database Applications C. Faloutsos & A. Pavlo, Spring 2014.

Carnegie Mellon University Department of Computer Science /615 - Database Applications C. Faloutsos & A. Pavlo, Spring 2014. Carnegie Mellon University Department of Computer Science 15-415/615 - Database Applications C. Faloutsos & A. Pavlo, Spring 2014 Homework 3 IMPORTANT Hand in your answers in class at 1:30pm on Thursday,

More information

My malloc: mylloc and mhysa. Johan Montelius HT2016

My malloc: mylloc and mhysa. Johan Montelius HT2016 1 Introduction My malloc: mylloc and mhysa Johan Montelius HT2016 So this is an experiment where we will implement our own malloc. We will not implement the world s fastest allocator, but it will work

More information

Roadmap DB Sys. Design & Impl. Reference. Detailed roadmap. Spatial Access Methods - problem. z-ordering - Detailed outline.

Roadmap DB Sys. Design & Impl. Reference. Detailed roadmap. Spatial Access Methods - problem. z-ordering - Detailed outline. 15-721 D Sys. Design & Impl. Z-ordering Christos Faloutsos www.cs.cmu.edu/~christos Roadmap 1) Roots: System R and Ingres 2) Implementation: buffering, indexing, q-opt 3) Transactions: locking, recovery

More information

Question 1: knn classification [100 points]

Question 1: knn classification [100 points] CS 540: Introduction to Artificial Intelligence Homework Assignment # 8 Assigned: 11/13 Due: 11/20 before class Question 1: knn classification [100 points] For this problem, you will be building a k-nn

More information

Scientific Computing (G /G ) Homework 10 example

Scientific Computing (G /G ) Homework 10 example Homework 10 example When you use the ODE solvers in MATLAB and then write scripts to automatically produce the plots, you use several pieces of software tied neatly together by a common environment. Because

More information

PRINCIPLES OF OPERATING SYSTEMS

PRINCIPLES OF OPERATING SYSTEMS PRINCIPLES OF OPERATING SYSTEMS Tutorial-1&2: C Review CPSC 457, Spring 2015 May 20-21, 2015 Department of Computer Science, University of Calgary Connecting to your VM Open a terminal (in your linux machine)

More information

EE516: Embedded Software Project 1. Setting Up Environment for Projects

EE516: Embedded Software Project 1. Setting Up Environment for Projects EE516: Embedded Software Project 1. Setting Up Environment for Projects By Dong Jae Shin 2015. 09. 01. Contents Introduction to Projects of EE516 Tasks Setting Up Environment Virtual Machine Environment

More information

ECE264 Fall 2013 Exam 3, November 20, 2013

ECE264 Fall 2013 Exam 3, November 20, 2013 ECE264 Fall 2013 Exam 3, November 20, 2013 In signing this statement, I hereby certify that the work on this exam is my own and that I have not copied the work of any other student while completing it.

More information

CS16 Exam #1 7/17/ Minutes 100 Points total

CS16 Exam #1 7/17/ Minutes 100 Points total CS16 Exam #1 7/17/2012 75 Minutes 100 Points total Name: 1. (10 pts) Write the definition of a C function that takes two integers `a` and `b` as input parameters. The function returns an integer holding

More information

Homework 8: Matrices Due: 11:59 PM, Oct 30, 2018

Homework 8: Matrices Due: 11:59 PM, Oct 30, 2018 CS17 Integrated Introduction to Computer Science Klein Homework 8: Matrices Due: 11:59 PM, Oct 30, 2018 Contents 1 Reverse (Practice) 4 2 Main Diagonal (Practice) 5 3 Horizontal Flip 6 4 Vertical Flip

More information

Project 5 Handling Bit Arrays and Pointers in C

Project 5 Handling Bit Arrays and Pointers in C CS 255 Project 5 Handling Bit Arrays and Pointers in C Due: Thursday, Apr. 30 by 8:00am. No late submissions! Assignment: This homework is adapted from the CS450 Assignment #1 that Prof. Mandelberg uses

More information

CS-220 Spring 2018 Test 1 Version A Feb. 28, Name:

CS-220 Spring 2018 Test 1 Version A Feb. 28, Name: CS-220 Spring 2018 Test 1 Version A Feb. 28, 2018 Name: 1. (10 points) For the following, Check T if the statement is true, the F if the statement is false. (a) T F : Every function definition in C must

More information

Exercise Session 2 Systems Programming and Computer Architecture

Exercise Session 2 Systems Programming and Computer Architecture Systems Group Department of Computer Science ETH Zürich Exercise Session 2 Systems Programming and Computer Architecture Herbstsemester 216 Agenda Linux vs. Windows Working with SVN Exercise 1: bitcount()

More information

JTSK Programming in C II C-Lab II. Lecture 3 & 4

JTSK Programming in C II C-Lab II. Lecture 3 & 4 JTSK-320112 Programming in C II C-Lab II Lecture 3 & 4 Xu (Owen) He Spring 2018 Slides modified from Dr. Kinga Lipskoch Planned Syllabus The C Preprocessor Bit Operations Pointers and Arrays (Dynamically

More information

CMSC 201 Spring 2018 Project 3 Minesweeper

CMSC 201 Spring 2018 Project 3 Minesweeper CMSC 201 Spring 2018 Project 3 Minesweeper Assignment: Project 3 Minesweeper Due Date: Design Document: Friday, May 4th, 2018 by 8:59:59 PM Project: Friday, May 11th, 2018 by 8:59:59 PM Value: 80 points

More information

Lab 09 - Virtual Memory

Lab 09 - Virtual Memory Lab 09 - Virtual Memory Due: November 19, 2017 at 4:00pm 1 mmapcopy 1 1.1 Introduction 1 1.1.1 A door predicament 1 1.1.2 Concepts and Functions 2 1.2 Assignment 3 1.2.1 mmap copy 3 1.2.2 Tips 3 1.2.3

More information

CS 1803 Pair Homework 3 Calculator Pair Fun Due: Wednesday, September 15th, before 6 PM Out of 100 points

CS 1803 Pair Homework 3 Calculator Pair Fun Due: Wednesday, September 15th, before 6 PM Out of 100 points CS 1803 Pair Homework 3 Calculator Pair Fun Due: Wednesday, September 15th, before 6 PM Out of 100 points Files to submit: 1. HW3.py This is a PAIR PROGRAMMING Assignment: Work with your partner! For pair

More information

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall Programming Assignment 1 (updated 9/16/2017)

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall Programming Assignment 1 (updated 9/16/2017) UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall 2017 Programming Assignment 1 (updated 9/16/2017) Introduction The purpose of this programming assignment is to give you

More information

CS 6371: Advanced Programming Languages

CS 6371: Advanced Programming Languages CS 6371: Advanced Programming Languages Dr. Kevin Hamlen Spring 2017 Fill out, sign, and return prereq forms: Course number: CS 6371 Section: 1 Prerequisites: CS 5343: Algorithm Analysis & Data Structures

More information

Reviewing gcc, make, gdb, and Linux Editors 1

Reviewing gcc, make, gdb, and Linux Editors 1 Reviewing gcc, make, gdb, and Linux Editors 1 Colin Gordon csgordon@cs.washington.edu University of Washington CSE333 Section 1, 3/31/11 1 Lots of material borrowed from 351/303 slides Colin Gordon (University

More information

Lab Exam 1 D [1 mark] Give an example of a sample input which would make the function

Lab Exam 1 D [1 mark] Give an example of a sample input which would make the function Grade: / 20 Lab Exam 1 D500 1. [1 mark] Give an example of a sample input which would make the function scanf( "%f", &f ) return 0? Answer: Anything that is not a floating point number such as 4.567 or

More information

Programming Assignment Multi-Threading and Debugging 2

Programming Assignment Multi-Threading and Debugging 2 Programming Assignment Multi-Threading and Debugging 2 Due Date: Friday, June 1 @ 11:59 pm PAMT2 Assignment Overview The purpose of this mini-assignment is to continue your introduction to parallel programming

More information

Recitation 14: Proxy Lab Part 2

Recitation 14: Proxy Lab Part 2 Recitation 14: Proxy Lab Part 2 Instructor: TA(s) 1 Outline Proxylab Threading Threads and Synchronization PXYDRIVE Demo 2 ProxyLab Checkpoint is worth 1%, due Thursday, Nov. 29 th Final is worth 7%, due

More information

Recitation: C Review. TA s 20 Feb 2017

Recitation: C Review. TA s 20 Feb 2017 15-213 Recitation: C Review TA s 20 Feb 2017 Agenda Logistics Attack Lab Conclusion C Assessment C Programming Style C Exercise Cache Lab Overview Appendix: Valgrind Clang / LLVM Cache Structure Logistics

More information

Project 1: Convex hulls and line segment intersection

Project 1: Convex hulls and line segment intersection MCS 481 / David Dumas / Spring 2012 Project 1: Convex hulls and line segment intersection Due at 2pm on Monday, February 6 0. Requirements In order to complete this project you will need CGAL and a compatible

More information

COSC 6385 Computer Architecture. - Homework

COSC 6385 Computer Architecture. - Homework COSC 6385 Computer Architecture - Homework Fall 2008 1 st Assignment Rules Each team should deliver Source code (.c,.h and Makefiles files) Please: no.o files and no executables! Documentation (.pdf,.doc,.tex

More information

Lab 03 - x86-64: atoi

Lab 03 - x86-64: atoi CSCI0330 Intro Computer Systems Doeppner Lab 03 - x86-64: atoi Due: October 1, 2017 at 4pm 1 Introduction 1 2 Assignment 1 2.1 Algorithm 2 3 Assembling and Testing 3 3.1 A Text Editor, Makefile, and gdb

More information

Data Structure and Algorithm Homework #3 Due: 2:20pm, Tuesday, April 9, 2013 TA === Homework submission instructions ===

Data Structure and Algorithm Homework #3 Due: 2:20pm, Tuesday, April 9, 2013 TA   === Homework submission instructions === Data Structure and Algorithm Homework #3 Due: 2:20pm, Tuesday, April 9, 2013 TA email: dsa1@csientuedutw === Homework submission instructions === For Problem 1, submit your source code, a Makefile to compile

More information

Operating Systems 2013/14 Assignment 1. Submission Deadline: Monday, November 18th, :30 a.m.

Operating Systems 2013/14 Assignment 1. Submission Deadline: Monday, November 18th, :30 a.m. Name Matriculation no. Tutorial no. Operating Systems 2013/14 Assignment 1 Prof. Dr. Frank Bellosa Dipl.-Inform. Marius Hillenbrand Dipl.-Inform. Marc Rittinghaus Submission Deadline: Monday, November

More information

Arrays and Memory Management

Arrays and Memory Management Arrays and Memory Management 1 Pointing to Different Size Objects Modern machines are byte-addressable Hardware s memory composed of 8-bit storage cells, each has a unique address A C pointer is just abstracted

More information

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch Purpose: We will take a look at programming this week using a language called Scratch. Scratch is a programming language that was developed

More information

CS61C : Machine Structures

CS61C : Machine Structures Get your clickers ready...! inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 3 Introduction to the C Programming Language (pt 1) 2013-01-28! Hello to Nishant Varma watching from India!!!Senior

More information

High Performance Computing in C and C++

High Performance Computing in C and C++ High Performance Computing in C and C++ Rita Borgo Computer Science Department, Swansea University Summary Introduction to C Writing a simple C program Compiling a simple C program Running a simple C program

More information

7/2/2013 R packaging with Rstudio Topics:

7/2/2013 R packaging with Rstudio Topics: 7/2/2013 R packaging with Rstudio Topics: How to make an R package using RStudio Sharing packages using github or url Tip for speeding up code Using Sweave and RStudio to do 'reproducible research/programming'.

More information

CMSC 201 Spring 2017 Homework 4 Lists (and Loops and Strings)

CMSC 201 Spring 2017 Homework 4 Lists (and Loops and Strings) CMSC 201 Spring 2017 Homework 4 Lists (and Loops and Strings) Assignment: Homework 4 Lists (and Loops and Strings) Due Date: Friday, March 3rd, 2017 by 8:59:59 PM Value: 40 points Collaboration: For Homework

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to UNIX environment and tools 0.1 Getting started with the environment and the bash shell interpreter Desktop computers are usually operated from a graphical

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

Project #1 Exceptions and Simple System Calls

Project #1 Exceptions and Simple System Calls Project #1 Exceptions and Simple System Calls Introduction to Operating Systems Assigned: January 21, 2004 CSE421 Due: February 17, 2004 11:59:59 PM The first project is designed to further your understanding

More information

Saleae Device SDK Starting a Device SDK Project on Windows Starting a Device SDK Project on Linux... 7

Saleae Device SDK Starting a Device SDK Project on Windows Starting a Device SDK Project on Linux... 7 Contents Starting a Device SDK Project on Windows... 2 Starting a Device SDK Project on Linux... 7 Debugging your Project with GDB... 9 Starting a Device SDK Project on Mac... 11 Build Script / Command

More information

Programming Tips for CS758/858

Programming Tips for CS758/858 Programming Tips for CS758/858 January 28, 2016 1 Introduction The programming assignments for CS758/858 will all be done in C. If you are not very familiar with the C programming language we recommend

More information

Common Misunderstandings from Exam 1 Material

Common Misunderstandings from Exam 1 Material Common Misunderstandings from Exam 1 Material Kyle Dewey Stack and Heap Allocation with Pointers char c = c ; char* p1 = malloc(sizeof(char)); char** p2 = &p1; Where is c allocated? Where is p1 itself

More information

CSE 333 Midterm Exam Sample Solution 7/29/13

CSE 333 Midterm Exam Sample Solution 7/29/13 Question 1. (44 points) C hacking a question of several parts. The next several pages are questions about a linked list of 2-D points. Each point is represented by a Point struct containing the point s

More information

Assignment 5: Priority Queue

Assignment 5: Priority Queue Assignment 5: Priority Queue Topic(s): Priority Queues, Code Reusability, More Advanced Makefiles, Debugging, Testing Date assigned: Wednesday, October 18, 2017 Date due: Wednesday, November 1, 2017, 9:15

More information

Intermediate Programming, Spring 2017*

Intermediate Programming, Spring 2017* 600.120 Intermediate Programming, Spring 2017* Misha Kazhdan *Much of the code in these examples is not commented because it would otherwise not fit on the slides. This is bad coding practice in general

More information

CS 61c: Great Ideas in Computer Architecture

CS 61c: Great Ideas in Computer Architecture Arrays, Strings, and Some More Pointers June 24, 2014 Review of Last Lecture C Basics Variables, functioss, control flow, types, structs Only 0 and NULL evaluate to false Pointers hold addresses Address

More information

COMP s1 Lecture 1

COMP s1 Lecture 1 COMP1511 18s1 Lecture 1 1 Numbers In, Numbers Out Andrew Bennett more printf variables scanf 2 Before we begin introduce yourself to the person sitting next to you why did

More information

CS 103 The Social Network

CS 103 The Social Network CS 103 The Social Network 1 Introduction This assignment will be part 1 of 2 of the culmination of your C/C++ programming experience in this course. You will use C++ classes to model a social network,

More information

DUE By 11:59 PM on Thursday March 15 via make turnitin on acad. The standard 10% per day deduction for late assignments applies.

DUE By 11:59 PM on Thursday March 15 via make turnitin on acad. The standard 10% per day deduction for late assignments applies. CSC 558 Data Mining and Predictive Analytics II, Spring 2018 Dr. Dale E. Parson, Assignment 2, Classification of audio data samples from assignment 1 for predicting numeric white-noise amplification level

More information

CS 429H, Spring 2012 Optimizing the Performance of a Pipelined Processor Assigned: March 26, Due: April 19, 11:59PM

CS 429H, Spring 2012 Optimizing the Performance of a Pipelined Processor Assigned: March 26, Due: April 19, 11:59PM CS 429H, Spring 2012 Optimizing the Performance of a Pipelined Processor Assigned: March 26, Due: April 19, 11:59PM 1 Introduction In this lab, you will learn about the design and implementation of a pipelined

More information

CS 450 Introduction to Networking Spring 2014 Homework Assignment 1 File Transfer and Data Bandwidth Analysis Tool

CS 450 Introduction to Networking Spring 2014 Homework Assignment 1 File Transfer and Data Bandwidth Analysis Tool CS 450 Introduction to Networking Spring 2014 Homework Assignment 1 File Transfer and Data Bandwidth Analysis Tool Due: Monday 17 February. Electronic copy due at 10:30 A.M., Optional paper copy may be

More information

Comp Assignment 4: Commands and Graphics

Comp Assignment 4: Commands and Graphics Comp 401 - Assignment 4: Commands and Graphics Date Assigned: Thu Sep 12, 2013 Completion Date: Fri Sep 20, 2013 Early Submission Date: Wed Sep 18, 2013 This assignment has two parts having to do with

More information

Programming Assignment 2

Programming Assignment 2 CMSC 417 Computer Networks Fall 2017 Programming Assignment 2 Assigned: September 14 Due: September 27, 11:59:59 PM. Weight: 1.2x 1 Introduction In this assignment you will implement distance vector routing.

More information

Eat (we provide) link. Eater. Goal: Eater(Self) == Self()

Eat (we provide) link. Eater. Goal: Eater(Self) == Self() 15-251: Great Theoretical Ideas Guru: Yinmeng Zhang Assignment 12 Due: December 6, 2005 1 Reading Comprehension (0 points) Read the accompanying handout containing Ken Thompson s Turing Award Lecture,

More information

CSE 351, Spring 2010 Lab 7: Writing a Dynamic Storage Allocator Due: Thursday May 27, 11:59PM

CSE 351, Spring 2010 Lab 7: Writing a Dynamic Storage Allocator Due: Thursday May 27, 11:59PM CSE 351, Spring 2010 Lab 7: Writing a Dynamic Storage Allocator Due: Thursday May 27, 11:59PM 1 Instructions In this lab you will be writing a dynamic storage allocator for C programs, i.e., your own version

More information

MIDTERM EXAM. CS 217 October 28, Name: Precept: Honor Code: Score: Problem Score Max

MIDTERM EXAM. CS 217 October 28, Name: Precept: Honor Code: Score: Problem Score Max MIDTERM EXAM CS 217 October 28, 1999 Name: Precept: Honor Code: Score: Problem Score Max 1 15 2 5 3 10 4 15 5 5 6 10 7 10 Total 70 1 1. Number Systems (a) Translate the following decimal numbers to binary,

More information

CS195H Homework 1 Grid homotopies and free groups. Due: February 5, 2015, before class

CS195H Homework 1 Grid homotopies and free groups. Due: February 5, 2015, before class CS195H Homework 1 Grid homotopies and free groups This second homework is almost all about grid homotopies and grid curves, but with a little math in the middle. This homework, last year, took people about

More information

CS201 - Lecture 1 The C Programming Language

CS201 - Lecture 1 The C Programming Language CS201 - Lecture 1 The C Programming Language RAOUL RIVAS PORTLAND STATE UNIVERSITY History of the C Language The C language was invented in 1970 by Dennis Ritchie Dennis Ritchie and Ken Thompson were employees

More information

CS 322 Operating Systems Programming Assignment 4 Writing a memory manager Due: April 5, 11:30 PM

CS 322 Operating Systems Programming Assignment 4 Writing a memory manager Due: April 5, 11:30 PM CS 322 Operating Systems Programming Assignment 4 Writing a memory manager Due: April 5, 11:30 PM Goals To understand the nuances of building a memory allocator. To create a shared library. Background

More information

CMSC 201 Spring 2017 Lab 01 Hello World

CMSC 201 Spring 2017 Lab 01 Hello World CMSC 201 Spring 2017 Lab 01 Hello World Assignment: Lab 01 Hello World Due Date: Sunday, February 5th by 8:59:59 PM Value: 10 points At UMBC, our General Lab (GL) system is designed to grant students the

More information

Final Project: LC-3 Simulator

Final Project: LC-3 Simulator Final Project: LC-3 Simulator Due Date: Friday 4/27/2018 11:59PM; No late handins This is the final project for this course. It is a simulator for LC-3 computer from the Patt and Patel book. As you work

More information

York University Faculty Science and Engineering Fall 2008

York University Faculty Science and Engineering Fall 2008 York University Faculty Science and Engineering Fall 2008 CSE2031 Final Software Tools Friday, Feb..26 th, 2008 Last Name 08:30 10:30am First name ID Instructions to students: Answer all questions. Marks

More information

Homework 7. For your information: Graded out of 100 points; 2 questions total 5-10 hours for phase 1; hours for phase 2.

Homework 7. For your information: Graded out of 100 points; 2 questions total 5-10 hours for phase 1; hours for phase 2. Carnegie Mellon University Department of Computer Science 15-415/615 - Database Applications C. Faloutsos & A. Pavlo, Spring 2014 Prepared by Alex Beutel and Vagelis Papalexakis DUE DATES: Ph1: 4/1, Ph2:

More information

COMS Spring Homework 3

COMS Spring Homework 3 COMS 1003-1 Spring 2011 Homework 3 The main goal of the first homework is to make you familiarize with advanced data types and pointers. There are 6 exercises in this assignment, for a total of 100 points.

More information

CMSC 201 Spring 2018 Lab 01 Hello World

CMSC 201 Spring 2018 Lab 01 Hello World CMSC 201 Spring 2018 Lab 01 Hello World Assignment: Lab 01 Hello World Due Date: Sunday, February 4th by 8:59:59 PM Value: 10 points At UMBC, the GL system is designed to grant students the privileges

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

Lab Exam 1 D [1 mark] Give an example of a sample input which would make the function

Lab Exam 1 D [1 mark] Give an example of a sample input which would make the function CMPT 127 Spring 2019 Grade: / 20 First name: Last name: Student Number: Lab Exam 1 D400 1. [1 mark] Give an example of a sample input which would make the function scanf( "%f", &f ) return -1? Answer:

More information

Computer Science 322 Operating Systems Mount Holyoke College Spring Topic Notes: C and Unix Overview

Computer Science 322 Operating Systems Mount Holyoke College Spring Topic Notes: C and Unix Overview Computer Science 322 Operating Systems Mount Holyoke College Spring 2010 Topic Notes: C and Unix Overview This course is about operating systems, but since most of our upcoming programming is in C on a

More information

Sample Examination. Family Name:... Other Names:... Signature:... Student Number:...

Sample Examination. Family Name:... Other Names:... Signature:... Student Number:... Family Name:... Other Names:... Signature:... Student Number:... THE UNIVERSITY OF NEW SOUTH WALES SCHOOL OF COMPUTER SCIENCE AND ENGINEERING Sample Examination COMP1917 Computing 1 EXAM DURATION: 2 HOURS

More information

Topic. Section 4.1 (3, 4)

Topic. Section 4.1 (3, 4) Topic.. California Standards: 6.0: Students graph a linear equation and compute the x- and y-intercepts (e.g., graph x + 6y = ). They are also able to sketch the region defined by linear inequality (e.g.,

More information

Problem Set 1: Unix Commands 1

Problem Set 1: Unix Commands 1 Problem Set 1: Unix Commands 1 WARNING: IF YOU DO NOT FIND THIS PROBLEM SET TRIVIAL, I WOULD NOT RECOMMEND YOU TAKE THIS OFFERING OF 300 AS YOU DO NOT POSSESS THE REQUISITE BACKGROUND TO PASS THE COURSE.

More information

Practical 2: Ray Tracing

Practical 2: Ray Tracing 2017/2018, 4th quarter INFOGR: Graphics Practical 2: Ray Tracing Author: Jacco Bikker The assignment: The purpose of this assignment is to create a small Whitted-style ray tracer. The renderer should be

More information

CS16 Midterm Exam 1 E01, 10S, Phill Conrad, UC Santa Barbara Wednesday, 04/21/2010, 1pm-1:50pm

CS16 Midterm Exam 1 E01, 10S, Phill Conrad, UC Santa Barbara Wednesday, 04/21/2010, 1pm-1:50pm CS16 Midterm Exam 1 E01, 10S, Phill Conrad, UC Santa Barbara Wednesday, 04/21/2010, 1pm-1:50pm Name: Umail Address: @ umail.ucsb.edu Circle Lab section: 9am 10am 11am noon (Link to Printer Friendly-PDF

More information

CS108, Stanford Handout #3. HW1 CodeCamp

CS108, Stanford Handout #3. HW1 CodeCamp CS108, Stanford Handout #3 Fall, 2008-09 Osvaldo Jiménez HW1 CodeCamp Thanks to Nick Parlante for much of this handout For this first homework, you will run through a series of small coding problems to

More information

CSE/EEE 230 Computer Organization and Assembly Language

CSE/EEE 230 Computer Organization and Assembly Language 1 Instructions You may work in pairs with one partner on this assignment if you wish or you may work alone. If you work with a partner, only submit one file to Blackboard with both of your names in the

More information

Project 1 Balanced binary

Project 1 Balanced binary CMSC262 DS/Alg Applied Blaheta Project 1 Balanced binary Due: 7 September 2017 You saw basic binary search trees in 162, and may remember that their weakness is that in the worst case they behave like

More information

CS 455 Midterm Exam 1 Fall 2017 [Bono] Thursday, Sep. 28, 2017

CS 455 Midterm Exam 1 Fall 2017 [Bono] Thursday, Sep. 28, 2017 Name: USC NetID (e.g., ttrojan): CS 455 Midterm Exam 1 Fall 2017 [Bono] Thursday, Sep. 28, 2017 There are 6 problems on the exam, with 55 points total available. There are 10 pages to the exam (5 pages

More information

CMSC 201 Spring 2018 Project 2 Battleship

CMSC 201 Spring 2018 Project 2 Battleship CMSC 201 Spring 2018 Project 2 Battleship Assignment: Project 2 Battleship Due Date: Design Document: Friday, April 13th, 2018 by 8:59:59 PM Project: Friday, April 20th, 2018 by 8:59:59 PM Value: 80 points

More information

CSC 418/2504 Computer Graphics, Winter 2012 Assignment 1 (10% of course grade)

CSC 418/2504 Computer Graphics, Winter 2012 Assignment 1 (10% of course grade) CSC 418/2504 Computer Graphics, Winter 2012 Assignment 1 (10% of course grade) Part A [50 marks in total] Due 11:59pm onwed., Feb. 8, 2012. Below are 4 exercises covering di erent topics from the first

More information

GDB and Makefile. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

GDB and Makefile. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island GDB and Makefile Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island GDB Debugging: An Example #include void main() { int i; int result

More information

Homework 6: Pose Tracking EE267 Virtual Reality 2018

Homework 6: Pose Tracking EE267 Virtual Reality 2018 Homework 6: Pose Tracking EE267 Virtual Reality 218 Due: 5/17/218, 11:59pm Instructions Students should use the Arduino environment and JavaScript for this assignment, building on top of the provided starter

More information

ECE264 Spring 2013 Final Exam, April 30, 2013

ECE264 Spring 2013 Final Exam, April 30, 2013 ECE264 Spring 2013 Final Exam, April 30, 2013 In signing this statement, I hereby certify that the work on this exam is my own and that I have not copied the work of any other student while completing

More information

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Adapted from the slides Revisões sobre Programação em C, Sérgio Crisóstomo Compilation #include int main()

More information

377 Student Guide to C++

377 Student Guide to C++ 377 Student Guide to C++ c Mark Corner January 21, 2004 1 Introduction In this course you will be using the C++ language to complete several programming assignments. Up to this point we have only provided

More information

CS2141 Software Development using C/C++ C++ Basics

CS2141 Software Development using C/C++ C++ Basics CS2141 Software Development using C/C++ C++ Basics Integers Basic Types Can be short, long, or just plain int C++ does not define the size of them other than short

More information

Review: C Strings. A string in C is just an array of characters. Lecture #4 C Strings, Arrays, & Malloc

Review: C Strings. A string in C is just an array of characters. Lecture #4 C Strings, Arrays, & Malloc CS61C L4 C Pointers (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #4 C Strings, Arrays, & Malloc Albert Chae Instructor 2008-06-26 Review: C Strings A string in C is just an array

More information

CIS 190: C/C++ Programming. Lecture 2 Pointers and More

CIS 190: C/C++ Programming. Lecture 2 Pointers and More CIS 190: C/C++ Programming Lecture 2 Pointers and More Separate Compilation to prevent the file containing main() from getting too crowded and long function prototypes in their own file (functions.h) function

More information

15-122: Principles of Imperative Computation, Spring 2016

15-122: Principles of Imperative Computation, Spring 2016 15-122 Programming 3 Page 1 of 8 15-122: Principles of Imperative Computation, Spring 2016 Programming 3: Images Due: Thursday 4 th February, 2016 by 22:00 This programming assignment will have you using

More information

Recitation 2/18/2012

Recitation 2/18/2012 15-213 Recitation 2/18/2012 Announcements Buflab due tomorrow Cachelab out tomorrow Any questions? Outline Cachelab preview Useful C functions for cachelab Cachelab Part 1: you have to create a cache simulator

More information

Software Development With Emacs: The Edit-Compile-Debug Cycle

Software Development With Emacs: The Edit-Compile-Debug Cycle Software Development With Emacs: The Edit-Compile-Debug Cycle Luis Fernandes Department of Electrical and Computer Engineering Ryerson Polytechnic University August 8, 2017 The Emacs editor permits the

More information

15-110: Principles of Computing, Spring Problem Set 3 (PS3) Due: Friday, February 9 by 2:30PM on Gradescope

15-110: Principles of Computing, Spring Problem Set 3 (PS3) Due: Friday, February 9 by 2:30PM on Gradescope 15-110: Principles of Computing, Spring 2018 Problem Set 3 (PS3) Due: Friday, February 9 by 2:30PM on Gradescope HANDIN INSTRUCTIONS Download a copy of this PDF file. You have two ways to fill in your

More information