INTRODUCTION TO CSCE 221 - LAB BASIC OF COMPUTERS, C++, UNIX, AND HELLO WORLD.

Slides:



Advertisements
Similar presentations
ARDUINO CLUB Session 1: C & An Introduction to Linux.
Advertisements

Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
Linux, it's not Windows A short introduction to the sub-department's computer systems Gareth Thomas.
COP 3275 COMPUTER PROGRAMMING USING C Instructor: Diego Rivera-Gutierrez
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
Computer Hardware.
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Midterm Thursday Topics: First Midterm Instructions Set Architecture Machine Language Programming Assembly Language Programming Traps, Subroutines, & Interrupts.
UNIX chapter 03 Getting Started Mr. Mohammad Smirat.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
1 Intro to C/C++ #include using namespace std; int main() { cout
CS0007: Introduction to Computer Programming Setting Up Java.
An Introduction to Operating Systems. Definition  An Operating System, or OS, is low-level software that enables a user and higher-level application.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Introduction to UNIX/Linux Exercises Dan Stanzione.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
3.1 Documentation & Java Language Elements Purpose of documentation Assist the programmer with developing the program Assist other programers who.
System Calls 1.
CSE 390a Editing and Moving Files
Introduction to Shell Script Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming 1.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Agenda Review Unix Review Algorithms Your first program Compiling programs What are functions? What is Object Oriented Programming? Variables Data Types.
Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors.
By Noorez Kassam Welcome to JNI. Why use JNI ? 1. You already have significantly large and tricky code written in another language and you would rather.
LINUX Tuesday, 5 July :00 pm. Remote Login l Use Secure Shell (ssh) l Machine name/IP address E.g. ssh hydra.sma.nus.edu.sg Or ssh
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
CS 444 Introduction to Operating Systems
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. The Operating System Allocates memory for.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
UNIX Introduction CSCE 221H Texas A&M University.
SPL – Practical Session 2 Topics: – C++ Memory Management – Pointers.
CS 2130 Lecture 5 Storage Classes Scope. C Programming C is not just another programming language C was designed for systems programming like writing.
C o n f i d e n t i a l 1 Course: BCA Semester: III Subject Code : BC 0042 Subject Name: Operating Systems Unit number : 1 Unit Title: Overview of Operating.
Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason.
Basic Systems and Software. Were we left off Computers are programmable (formal) machines. Digital information is stored as a series of two states (1.
CSC 235 Computer Organization. Computer Organizaton ä Top_Level Structure ä The von-Neumann Machine ä Stack Machine ä Accumulator Machine ä Load/Store.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Introduction to Scripting Workshop October
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
C++ / G4MICE Course Session 1 - Introduction Edit text files in a UNIX environment. Use the g++ compiler to compile a single C++ file. Understand the C++
Chapter 1 09/04/13. Change Your Password  The command is: passwd In the lab first do : ssh -Y onyx  You will have to see me to change it, if you forget.
Byoung-Jo CHOI Fall 2007 SW Project II Advanced Linux Programming.
CS 1308 Exam 2 Review. Exam Format 110 Total Points 24 Points Short Answer 28 Points Fill in the Blank 16 Points T/F 36 Points Multiple Choice The above.
INTRODUCTION – COMPUTERS, BASIC C++, UNIX ACKNOWLEDGEMENT: THE SLIDES ARE PREPARED FROM SLIDES PROVIDED BY NANCY M. AMATO AND JORY DENNY 1.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
Chapter 16 Advanced Bourne Shell Programming. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To discuss numeric data processing.
+ Introduction to Unix Joey Azofeifa Dowell Lab Short Read Class Day 2 (Slides inspired by David Knox)
Introduction to Scripting Workshop February 23, 2016.
Tutorial Six Linux Basics CompSci Semester Two 2016.
Chapter 1: Introduction to Computers and Programming
ENEE150 Discussion 01 Section 0101 Adam Wang.
Class Projects and Environment
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
Andy Wang Object Oriented Programming in C++ COP 3330
Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors.
Intro to UNIX System and Homework 1
Computer Electronic device Accepts data - input
Lab: ssh, scp, gdb, valgrind
Computer Systems Programming
Computer Electronic device Accepts data - input
Operating Systems Lecture 5.
Computer Electronic device Accepts data - input
Dynamic Memory A whole heap of fun….
Video Notes.
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

INTRODUCTION TO CSCE LAB BASIC OF COMPUTERS, C++, UNIX, AND HELLO WORLD

COMPUTERS Basic architecture Memory stores the data CPU is the brain Fetches data to and from memory Interplay with IO CPU ALU Registers Control Logic Input Devices Output Devices Memory Data Instructions

COMPUTERS Important as a programmer to understand how your program and rest of computer interact! Hardware Operating SystemCompilerProgramUser You are here!

MEMORY Function Stack (Statically Allocated) Heap (Dynamically Allocated)

C++ REVIEW Data Type – defines possible actions (primitives, classes – user-defined, templates) Variable – instance in memory Declaration – Tell the compile variable, function, or type exists Definition – Initializing value of variable, full specification of type or function Example int i; //declaration Foo bar(10); //declaration + definition

C++ REVIEW Operations Math operations (+, -, *, /, %) Comparison (==, !=, >, <, etc) Assignment (=) Access ([], (), *, ->) Boolean (&, ^, !, &&, ||, etc) etc

C++ REVIEW Loops Basic for for(int i = 0; i < 10; ++i); for(iterator i = begin(); i != end(); ++i); Basic while while(!done) do_something(); Basic do while do { something(); } while(!done);

C++ REVIEW Functions Basic signature return_type function_name(param1, param2, …, paramN); Example void foo(int, char); Foo bar(int i, char c);

LINUX PuTTY is an application to establish SSH connections Development machine: linux.cse.tamu.edu Open a PuTTY session and log into linux

BASIC UNIX COMMANDS cd: change directory mkdir: make directory ls: list items in a directory g++-4.7: invoke GNU’s C++ compiler vim / emacs / nano: text editing

VIM Quick start guide Vim cheat sheet Vim settings fileVim settings file – put in home directory labeled “.vimrc”

HELPFUL TOOLS FOR LINUX gdb – debugging tool for linux gdb valgrind – memory leak detector/memory profiler valgrind screen – helpful when working remotely in a terminal. Saves the terminal session even if the network connection cuts out screen LaTex – tool for creating documents LaTex top – monitor the system processes top

EXERCISE – HELLO WORLD