User Tools

Site Tools


labpage

LABS

Introduction

This course has weekly labs.

  • Labs are submitted electronically.
  • The due date is Wednesday midnight of every week (there is no submission for lab 1, you have to demo the lab to the TA during the lab time.
  • labs are marked electronically, 75% of the marks are calculated by comparing your code output to the model output. That means you have to be very careful. Follow the specifications carefully, an extra comma, new line, or a space might make the difference.



Lab 1

DO NOT SUBMIT LAB 1




Lab 2

LAB 2 Due Sept. 30 2020

Here is the Test cases and the corresponding output

Note : There is a bug in the model answer, 1 1 9 should be WIDE APART, that will be corrected and added. If you have any other complaints (other than the above) please contact mkidris@eecs.yorku.ca

Marks distribution 5+5+5

Model Answer lab2_1.txt lab2_2.txt




Lab 3

Friday Oct 2nd and Monday Oct 5 LAB 3 Due Sept 30

Here is the Test cases and Model Answer

If you have any marking issues, please contact parhammh@eecs.yorku.ca

Marks distribution 3+3+4

Model Answers lab3_1.txt lab3_2.txt lab3_3.txt




Lab 4

Friday Oct 9 should be Oct 2 and Monday Oct 12 Should be Oct 5 LAB 4 Due Oct 7 I will post some examples on text files for this lab soon

Here are two example files names.txt and products.txt

Correction In the file names.txt, inder name “Isabel Coppedge” there are two keys, that is a typo. Please remove one of them. Only one product ID per entry

Model Answers lab4_1.txt

If you have any concern, After you verify your code with the test cases you can contact Abdullah a89@eecs.yorku.ca




LAB TEST

here Lab Test 1

Here are the instructions on testing

Here are the files A.txt C.txt b1.txt b2.txt b3.txt

Lab Test 1 solution Note in q1 it should be if [ ! -d $i ]




LAB 5

Lab 5 is here LAB 5 and is due Wed Oct 21

Examples for input

Part 1

5

2 3.2 -4.5 1.7 2.8

The output

NO

Part 2

This is your input followed by carriage return

The output

4

this should be displayed in 6 places right justified

Part 3

This is the 78b$56 input

the output is

24

4

5

Model Answer lab5_1.txt lab5_2.txt

Test Cases Test cases for part 3, you have to make your own test cases because tabs and spaces will not show well in a pdf file. Use a combination of tabs and spaces in your cases




Lab 6

Here is Lab 6 Note that the matrix is inputted in a row major format

Due date: Wed. 28, 2020 midnight

Here are some examples for I/O of Lab 6 test cases

Model answers lab6_1.c lab6_2.c lab6_3.c




Lab 7

Here is lab_7.pdf it is Due Oct 11 Note that does NOT mean there is no lab next week. There is lab 8 and will be due Nov 11 too

Test cases

LAB TEST 2

Here it is Lab Test 2 Note you submit to three different directories as stated Submit all files as .c

Possible solutions

q21.c I printed the sum of the main diagonal and anti diagonal, easy to modify

q22.c

q23.c In this solution, I stopped at finding the match, keep i value and that is the solution




LAB 8

Lab 8 is here Lab 8 write.c

T name format is fname <space> lname here is one example of the dat.txt file

For example, you do

a.out -name John

You display all students with first name John as follows

ID John Black B

Note, there are tabs not shown in the above

Solution lab8.c

Here is the data file dat.txt

IMPORTANT

before contacting test your code. How

It is a little bit problematic for me to upload a binary file here, so compile and run this program makeinput.c using this input file input.txt

This means, compile the C file and run it as

a.out < input.txt

That generates the dat.txt file that you will read it in your lab.

Then run the code you submitted 9after compiling it of course as such

   a.out -count
   
   a.out -grade A
   
   a.out -grade C
   
   a.out -name John
   
   a.out -name Leslie
   

The output should be

case 1

4

case2

St. ID Name

1234 John Doe

4567 Leslie Rider

case 3

St. ID Name

3456 John Jack

case 4

1234 John Doe A

3456 John Jack C

case 5

4567 Leslie Rider A




LAB 9

Lab 9 is here The lab is due Friday Nov 20

Part 2 should be submitted as lab9_2.c

Solution for part 2 lab9_2.c In this lab, I read the data fist in an array and get the max number. For part 1, you read the max already


LAB 10

Here are some documentation about the OM4000 board

Lab 10 Due Friday Nov 27

== Example solution == Lab 10 solution




Lab 11

Lab 11 Lab 11 is due Dec 8 midnight




Lab 12

Lab 12 Lab 12 is due Dec. 8 midnight




LAB TEST 3

LAB TEST 3 due 4:00pm

labpage.txt · Last modified: 2020/12/21 02:23 by aboelaze