Welcome to CSCI 230! Problem Solving using C

Slides:



Advertisements
Similar presentations
Introduction to the Omega Server CSE Overview Intro to Omega Basic Unix Command Files Directories Printing C and C++ compilers GNU Debugger.
Advertisements

Jump to first page Unix Commands Monica Stoica Jump to first page Introduction to Unix n Unix was born in 1969 at Bell Laboratories, a research subdivision.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Linux & Applications Sean GavinWayne State University multi-user environment -- log in: user name and password -- you never turn the computer on or off.
CS 202 Computer Science II Lab Fall 2009 August 27.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
Dayu Zhang 9/3/2014 Lab01. Lab Instructor: Dayu Zhang Office Hour Mon/Wed 10:40am – 11:10am Room A201 Lab Website
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
1 Some basic Unix commands u Understand the concept of loggin into and out of a Unix shell u Interact with the system in a basic way through keyboard and.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.
Agenda What is Computer Programming? The Programming Process
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
Notes Assignment #1 is due next Friday by 11:59 pm via Test #1 will be held Thursday February 18 at the start of class (one period long) Format:
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Unix Basics Chapter 4.
Cmsc 312 Operating Systems. UNIX? DOS – PC? VAX/VMS - mainframe Unix – PC, workstation, mainframe 1970 bell Lab For computer scientist? Why popular? Free.
The UNIX development environment CS 400/600 – Data Structures.
1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.
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
1 Editing a C Program 01/16/15. 2 Objective Use Linux to edit, compile and execute a C program.
CS240 Computer Science II Introduction the Unix File System and File Related Utilities Based on “UNIX for Programmers and Users” by G.Class and K. Ables.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
Introduction to UNIX Geraint Vaughan. What is UNIX? Command-line operating system (not point- and click) Designed for ‘experts’ Lots of different variants.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
Introduction to Unix (CA263) File Editing By Tariq Ibn Aziz.
Introduction to Programming Using C An Introduction to Operating Systems.
COP3502: Introduction to Computer Science Yashas Shankar Lecture #2.
More on Using onyx 8/28/13. Program 1 Due a week from today. See website for details.
A gentle introduction to LINUX at the command prompt.
Basic Unix Commands & GCC Saurav Karmakar Spring 2007.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
Introduction to UNIX and Linux.  Written by Dennis Ritchie and Ken Thomsom at Bell Labs in 1969  Initially written in assembly language and a high-level.
Dr. Sajib Datta Jan 16,  The website is up.  Course lectures will be uploaded there ◦ Check regularly for assignments and update.
CMSC 104, Version 8/061L03OperatingSystems.ppt Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux.
Linux CSE 1222 CSE1222: Lecture 1BThe Ohio State University1.
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.
Tutorial Six Linux Basics CompSci Semester Two 2016.
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
ENEE150 Discussion 01 Section 0101 Adam Wang.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
First Day in Lab Making a C++ program
CS1010: Intro Workshop.
Introducing the UNIX Operating System.
Login The Login prompt provides access to the files located on the server.
Getting started with CentOS Linux
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
UNIX The Basics Source:
The Command Prompt Commands are the way to “do things” in Unix
Welcome to CSCI 230! Problem Solving using C
Unix : Introduction and Commands
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems Lecture 5.
CSCI The UNIX System Shell Startup and Variables
Lab 00 Discussion Linux Basics
Getting started with CentOS Linux
Module 6 Working with Files and Directories
Java Tutotrial for [NLP-AI] 2
Lab 2: Terminal Basics.
CSCE 206 Lab Structured Programming in C
Presentation transcript:

Welcome to CSCI 230! Problem Solving using C CSCI 230 Computing-I Welcome to CSCI 230! Problem Solving using C

General Information Your lab instructor… Your lab time…

Objectives for the Lab Learn problem solving strategies Achieve intermediate knowledge of C Programming Language Gain experience leveraging basic data structures Get an understanding of simple algorithms

Agenda Environment setup Introduction to UNIX Login to Phoenix Email UNIX files and directory structure Basic UNIX commands

Agenda How to use a text editor vi editor -- basic commands Create and compiler your first C program! “Hello world” program Compile using “gcc” compiler Execute

Login to UNIX User Name Password First letter of first name, followed by up to the first seven letters of your last name Password First letter of your first name, followed by the last 4 digits of your student id, followed by the first 3 letters of your last name E.g., if the name is John Smith and the student id is: 999-99-9999 then the user id and the password are: jsmith j9999smi

Login (Cont’d) UNIX is case-sensitive! The username and the password are in lower-case If you are NOT able to logon then try: user name as: first letter of your first name, followed by the middle initial, followed by the last name (at the maximum of 6 characters) If John’s Smith’s middle name is Adams then his user name will be jasmith If nothing works, inform the instructor Once you login for the first time, the system will prompt you to change the password…create a new password and remember it

Introduction to UNIX UNIX is a multitasking operating system that manages the resources of a computer and provides a user interface. UNIX is case sensitive, which means, upper and lower case characters are treated as different characters. The UNIX machine for which you are given an account is: phoenix.cs.iupui.edu

The UNIX Directory Structure A directory is a location to store information. UNIX starts with a root directory / /etc /home /usr /bin /jsmith /tjones /local

The UNIX Prompt login: jsmith Password: Last login: Mon Aug 22 08:42:33 from gatekeep.usagrou Sun Microsystems Inc. SunOS 5.8 Generic February 2000 phoenix{jsmith}1: Command number Machine name User name

Essential UNIX Commands ls- list files in present working directory pwd- display present working directory cd- change directory cd .. Backup one directory level lp (or lpr) - print file to printer: Printer in SL251! rm- remove a file cp- copy a file mv- move or rename a file mkdir- make a directory rmdir- remove a directory

Email Pine is the e-mail editor on phoenix E-mail is to communicate to the instructors and other classmates for questions and material related to CSCI230 Project updates and class notifications are distributed via email Check your email OFTEN!

Class E-mail Subscription Subscribe to the class email to receive mail sent to the entire class by instructors and other classmates Send mail to: majordomo@cs.iupui.edu Subject: blank Body of Message: subscribe cs230

Pine From the unix prompt type pine The system will indicate the welcome message for the first time Type c to compose a mail Write majordomo@cs.iupui.edu in the To field Leave the Subject field blank Type subscribe cs230 below Message Text Type control x to send the mail Type q to quit

How to Use Vi phoenix{jsmith}1:vi filename :q! - Quit without saving :wq – Quit and save :w – Save Line number{Shift}g – Goto line number {Shift}g – Goto end of file x - To delete the char at the cursor dd - Delete the entire line

How to Compile A Program phoenix{jsmith}1: gcc program1.c C programs end in the “.c” extension The executable file is called a.out

How to Execute Your Program phoenix{jsmith}1: a.out Type the name of the executable file at the prompt to run your program

Your First C Program # include <stdio.h> void main(void) { printf(“Hello, CSCI 230!\n”); }