Docsity

Introduction Worksheet, Assignments of Introduction to Computers

Toggle sidebar
bg1
Introduction
Forming Group
Start time:
In this activity, you work in teams of 2~3 students to learn new programming concepts.
Content Learning Objectives
1. Meet your peers, form teams, and collaborate.
2. Learn ASCII
3. Review basic operating system concept
4. Practice GDB
(15 min) Activity 1. Introductions
Start time:
Introduce yourself to your teammate. Study the roles given below. Decide who will be what
role for today and write the names in the table below. If you have only two people, one
should have two roles.
Q1.
Role
Name
Hobby
Project Manager: reads the questions aloud, keeps track of
time and makes sure everyone contributes appropriately.
1. Clicks on FILE-> MAKE A COPY
2. Shares the copy with all the other team members using
their UMass email address
Recorder: records all answers in the Google doc shared by
the Manager and ensures the team agrees on responses.
Hacker: type the code and execute.
pf3

Partial preview of the text

Download Introduction Worksheet and more Assignments Introduction to Computers in PDF only on Docsity!

Introduction

Forming Group Start time:

In this activity, you work in teams of 2~3 students to learn new programming concepts.

Content Learning Objectives

  1. Meet your peers, form teams, and collaborate.
  2. Learn ASCII
  3. Review basic operating system concept
  4. Practice GDB

(15 min) Activity 1. Introductions Start^ time:

Introduce yourself to your teammate. Study the roles given below. Decide who will be what role for today and write the names in the table below. If you have only two people, one should have two roles. Q1. Role Name Hobby Project Manager : reads the questions aloud, keeps track of time and makes sure everyone contributes appropriately.

  1. **Clicks on FILE-> MAKE A COPY
  2. Shares the copy with all the other team members using their UMass email address Recorder** : records all answers in the Google doc shared by the Manager and ensures the team agrees on responses. Hacker : type the code and execute.

(10 min) Activity 2. ASCII Start time: Q2. Please write a program to run the following code and tell us the output. printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", 73, 32, 108, 111, 118, 101, 32, 109, 97, 99, 104, 105, 110, 101, 33, 10); Answer: (5 min) Activity 3. Operating System Start^ time: Q3. List three OS Abstractions. You can find the answer in the slides. Answer: (20 min) Activity 4. GDB Start time: Download Project 1 starter code into your Edlab machine, unzip the .zip file, and run make to compile the starter code. If you do not make any edit on the code and just run it, you will encounter the segmentation fault when running the XXX_test file. Please use gdb to find it and answer the following questions. Q4. Which line in the test.cpp causes this segmentation fault? Why does it cause this segmentation fault? Hint: A segmentation fault in C occurs when a program attempts to access a memory location that it's not allowed to, often due to dereferencing a null or invalid pointer. Answer: