CSE 351. Introduction & Course Tools

Similar documents
Saint Louis University. Intro to Linux and C. CSCI 2400/ ECE 3217: Computer Architecture. Instructors: David Ferry

PRINCIPLES OF OPERATING SYSTEMS

CSE 391 Editing and Moving Files

Beyond this course. Machine code. Readings: CP:AMA 2.1, 15.4

Exercise 1: Basic Tools

Working with Shell Scripting. Daniel Balagué

C Compilation Model. Comp-206 : Introduction to Software Systems Lecture 9. Alexandre Denault Computer Science McGill University Fall 2006

CSC111 Computer Science II

Intermediate Programming, Spring Misha Kazhdan

Working Outside the Lab

CS 253: Intro to Systems Programming 1/21

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

Lab 1 Introduction to UNIX and C

Lab 1 Introduction to UNIX and C

Problem Set 1: Unix Commands 1

COMP s1 Lecture 1

Programming the DMCC in C

CSE 391 Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

CS 261 Recitation 1 Compiling C on UNIX

EL2310 Scientific Programming

Tutorial 1 C Tutorial: Pointers, Strings, Exec

Introduction to Supercomputing

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

Laboratory 1 Semester 1 11/12

COL100 Lab 2. I semester Week 2, Open the web-browser and visit the page and visit the COL100 course page.

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

IoT with Intel Galileo Gerardo Carmona. makerobots.tk

CS240: Programming in C

Hand-on Labs for Chapter 1 and Appendix A CSCE 212 Introduction to Computer Architecture, Spring

Programming in C week 1 meeting Tiina Niklander

CSE 351. GDB Introduction

Parallel Programming Pre-Assignment. Setting up the Software Environment

Parallel Programming Pre-Assignment. Setting up the Software Environment

Programming in C First meeting

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

CS CS Tutorial 2 2 Winter 2018

Linux Tutorial #1. Introduction. Login to a remote Linux machine. Using vim to create and edit C++ programs

York University Faculty Science and Engineering Fall 2008

CSE 390a Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

Hello, World! in C. Johann Myrkraverk Oskarsson October 23, The Quintessential Example Program 1. I Printing Text 2. II The Main Function 3

Using echo command in shell script

CS240: Programming in C. Lecture 2: Overview

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco

Lecture 03 Bits, Bytes and Data Types

EL2310 Scientific Programming

MEIN 50010: Python Introduction

Computers and Computation. The Modern Computer. The Operating System. The Operating System

CS 211 Programming I for Engineers

Programming in C First meeting Tiina Niklander

CMPT 300. Operating Systems. Brief Intro to UNIX and C

In case you didn t get it (or you were too lazy to check)

Introduction to Computing V - Linux and High-Performance Computing

Week 1, continued. This is CS50. Harvard University. Fall Cheng Gong

Getting started with UNIX/Linux for G51PRG and G51CSA

C-Programming. CSC209: Software Tools and Systems Programming. Paul Vrbik. University of Toronto Mississauga

Introduction to Linux. Fundamentals of Computer Science

SU 2017 May 11/16 LAB 2: Character and integer literals, number systems, character arrays manipulation, relational operator

Intro to Programming 2017

CS 220: Introduction to Parallel Computing. Beginning C. Lecture 2

CS 300 Leftovers. CS460 Pacific University 1

Introduction: The Unix shell and C programming

CS Lab 1 Linux/Shell Basic commands Introduction. Teaching Assistant Henrique Potter

Chapter 11 Introduction to Programming in C

CMPUT 201: Practical Programming Methodology. Guohui Lin Department of Computing Science University of Alberta September 2018

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

CS 361 Computer Systems Fall 2017 Homework Assignment 1 Linking - From Source Code to Executable Binary

Using Ruby and irb in CSE 341 Winter 2015

APT Session 4: C. Software Development Team Laurence Tratt. 1 / 14

C Tutorial: Part 1. Dr. Charalampos C. Tsimenidis. Newcastle University School of Electrical and Electronic Engineering.

Itron Riva Dev Software Development Getting Started Guide

Practical Session 0 Introduction to Linux

LAB 1 INTRODUCTION TO LINUX ENVIRONMENT AND C COMPILER

Chapter 1 An Introduction to C++, Unix, SSH and Komodo Edit

CSE 303: Concepts and Tools for Software Development

EL2310 Scientific Programming

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

University of Colorado at Colorado Springs CS4500/ Fall 2018 Operating Systems Project 1 - System Calls and Processes

CSE 303 Lecture 8. Intro to C programming

Introduction to Linux

ECE 2036 Lab 1: Introduction to Software Objects

CMSC 201 Spring 2017 Lab 01 Hello World

Version Control with Git

CS 460 Linux Tutorial

Gradle and Command Line Workshop Activity

Programming refresher and intro to C programming

Programming Studio #1 ECE 190

BIL 104E Introduction to Scientific and Engineering Computing. Lecture 14

Linux at the Command Line Don Johnson of BU IS&T

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

CSCI2467: Systems Programming Concepts

Reviewing gcc, make, gdb, and Linux Editors 1

Chapter 11 Introduction to Programming in C

SU2017. LAB 1 (May 4/9) Introduction to C, Function Declaration vs. Definition, Basic I/O (scanf/printf, getchar/putchar)

Chapter 11 Introduction to Programming in C

Carleton University Department of Systems and Computer Engineering SYSC Foundations of Imperative Programming - Winter 2012

Chapter 11 Introduction to Programming in C

Setting up my Dev Environment ECS 030

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Outline. Lecture 1 C primer What we will cover. If-statements and blocks in Python and C. Operators in Python and C

Lecture 1. A. Sahu and S. V. Rao. Indian Institute of Technology Guwahati

Transcription:

CSE 351 Introduction & Course Tools

Meet Your TA TA Name Interesting information examples: Where you are from Year in school Hobbies Unique talents

Introductions Pick an interesting (but quick) ice breaker to get students to introduce themselves or a classmate.

Why take 351? Aside from it being a CSE requirement The labs are fun You learn how computers work! Introduction to the C language, as well as x86_64 assembly

Working Environment Install the CSE Home VM (best option for EE) or Use the CSE Lab computers running Linux or Remote access into Attu (only CSE Students) NO OTHER ENVIRONMENTS ARE SUPPORTED

Text Editors This is a personal preference Try several, choose the one you like and get fast Command-line Nano Vim Emacs Graphical Gedit Emacs

Bash vs SSH Bash: The command line interface SSH: The connection between you and the server

Changing directories Using Bash cd <path> (Relative path or absolute path beginning with / ) cd.. (Go up one directory) Editing files vi <file path> or emacs <file path> (Relative path or absolute path beginning with / )

Accessing Attu Connect via SSH to use Bash Windows: Use PuTTY Mac: Open terminal, and run: ssh l<cse USERNAME> attu.cs.washington.edu Transferring Files Use FileZilla/Cyberduck -- FTP Clients -- to drag & drop between server and your computer Bash alternative: scp (google or ask us how to use)

Accessing the VM Install the VM in VMWare Ask for help if you need it To access Bash Spin up the VM, open console / terminal To transfer files Drag and drop from your computer to the VM window and vice versa

GCC This is a command-line utility that compiles your C files To create an executable program in C, there are two phases: Compiling Linking Compile: gcc -Wall -std=c99 -c main.c This produces an object file: main.o Link: gcc main.o -o test This produces an executable program file: test

GCC For this class, you will only be writing simple programs, so you can easily combine the compiling & linking phases Compile & Link: gcc -Wall -std=c99 main.c -o test This accomplishes the same thing as before in just one command

Hello World #include <stdio.h> int main(int argc, char *argv[]) { } printf( Hello World!\n );

Try it on your own If you have a laptop with you, download the HelloWorld.c from the course website Compiling the program: gcc HelloWorld.c -o hello Running the program:./hello

About printf() Used for printing to the console You can t just concatenate strings with variables like you can in Java Insert placeholders to print out variables The placeholder depends on the type of the variable %d, signed int %u, unsigned int %f, float %s, string %x, hexadecimal int %p, pointer

Printf() Examples printf( I am %d years old, 20) Prints I am 20 years old printf( My name is %s, Alfian ) Prints My name is Alfian printf( %d in hex is %x, 2827, 2827) Prints 2827 in hex is 0xb0b

Another Example Download calculator.c from the course website Again, navigate to the file, compile it, and run it Example usage: "./calculator 4 5 +"

Linux man Pages When you don t know how to use a particular shell command or C function, you have several options One option is this site: http://google.com Another option is using the man command: man 3 printf This will give a detailed description of printf()