LAB 1 INTRODUCTION TO LINUX ENVIRONMENT AND C COMPILER

Size: px
Start display at page:

Download "LAB 1 INTRODUCTION TO LINUX ENVIRONMENT AND C COMPILER"

Transcription

1 LAB 1 INTRODUCTION TO LINUX ENVIRONMENT AND C COMPILER School of Computer and Communication Engineering Universiti Malaysia Perlis 1

2 1. GETTING STARTED: 1.1 Steps to Create New Folder: Click Places icon > Home Folder > Go to File menu > Create Folder Rename the New Folder as your Matrix No. 1.2 Steps to Start the Text Editor: Click Applications icon > Accessories > Text Editor (you are now in gedit editor) Once the gedit text editor started, automatically it will view an untitled program. 1.3 Steps to Create New Program in gedit: Type the following program: // Program Example 1 // This program displays message "Welcome to UniMAP #include <stdio.h> int main() { printf("\nwelcome to UniMAP\n"); return 0; } Once finished, save the program file or also known as the source file. 1.4 Steps to Save the Source File: Go to File menu, select Save as option Save the file as welcome.c. Type welcome.c in the box besides the Name location. OR if you want to save in a specified folder, select the folder in the save as dialog box. (e.g. /home/student/foldername), double click the folder icon and then type welcome.c in the box besides the Name location. Click Save button. Notes : The filename must be in one word with extension.c, for example Program.c or pgm_1.c. 1.5 Steps to Compile a Program: Click Applications icon > Accessories > Terminal Use the following commands to check the source file location: pwd - command to check the current directory ls - to list down the files in the current directory. cd directory - to change directory If you have found your file, use the command gcc to compile the program welcome.c gcc welcome.c 2

3 Note: after compiling using the above command, if there is no error a default binary file, a.out is created. This is an executable file You can also compile the program and specify the output file (the executable file) name together with the compile command. This is to specify or named your binary file related to your program. gcc -o welcome.out welcome.c OR gcc welcome.c -o welcome.out Note: use the o parameter to specify the output file, followed the filename that you want to specify. 1.6 Steps to Execute or Run the Program In the Terminal window, at the command prompt, run the binary file To run the default output (or binary) file, type:./a.out Note: the./ to specify the binary file is in the current directory. OR To run the specific output (or binary) file, type:./welcome.out When you run the file, the output should be: Welcome to UniMAP CONGRATULATIONS!!!! You are now able to write and run your first program successfully. 3

4 2. TASKS Now you have learned to compile a simple C program, try to answer the following questions: 2.1 True or False: a. In general, C statement is case sensitive Ans: b. The name of the primary function of a C program must be main Ans: c. main ( ) { } is a complete and correct C program. Ans: 2.2 Find error(s), if any, in each statement: a. void main (void); b. printf ( Do we need parentheses here? ); c. Printf( Is there any wrong here? ); d. printf( Where do we need a blank space ) 2.3 Type, compile and run this program, correct any error(s) you may find and rewrite the program. main( ) {printf ( There is no class tomorrow ); } 2.4 Determine and correct any error(s) you may find in the following command. ma in() PRINTF *, ( What is wrong? ); 4

5 2.5 Type the following program. #include <stdio.h> void main (void) { int da; float fb; da = 2; fb = 3.0; printf( Learning Basic Structure of C Language ); printf( da + fb = %f, da+fb); } a. Compile the above program and write down the comment given on the screen after compiling. b. Compile the above program to specify the output (binary) to a filename basic.out and then run the output file. Write the command that you use to complete the above instruction c. Write down the output of the program. d. Format the floating number into 8 numbers and 2 floating point. Write down the formatting format you use. e. Correct the program so that the output looks presentable. Describe the changes you have done and the output of the program. i. Write down the changes done to the program: 5

6 ii. What is the output of the program? f. Change the first void to int, then compile the program. Write down any message after compiling. g. Explain the program in your own word and describe the command from top until end of the program. 6

Lab 1: Introduction to C Programming. (Creating a program using the Microsoft developer Studio, Compiling and Linking)

Lab 1: Introduction to C Programming. (Creating a program using the Microsoft developer Studio, Compiling and Linking) Lab 1: Introduction to C Programming (Creating a program using the Microsoft developer Studio, Compiling and Linking) Learning Objectives 0. To become familiar with Microsoft Visual C++ 6.0 environment

More information

Intermediate Programming, Spring Misha Kazhdan

Intermediate Programming, Spring Misha Kazhdan 600.120 Intermediate Programming, Spring 2017 Misha Kazhdan Outline Unix/Linux command line Basics of the Emacs editor Compiling and running a simple C program Cloning a repository Connecting to ugrad

More information

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

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011 Oregon State University School of Electrical Engineering and Computer Science CS 261 Recitation 1 Spring 2011 Outline Using Secure Shell Clients GCC Some Examples Intro to C * * Windows File transfer client:

More information

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

Computers and Computation. The Modern Computer. The Operating System. The Operating System The Modern Computer Computers and Computation What is a computer? A machine that manipulates data according to instructions. Despite their apparent complexity, at the lowest level computers perform simple

More information

COMP s1 Lecture 1

COMP s1 Lecture 1 COMP1511 18s1 Lecture 1 1 Numbers In, Numbers Out Andrew Bennett more printf variables scanf 2 Before we begin introduce yourself to the person sitting next to you why did

More information

Course Information and Introduction

Course Information and Introduction August 22, 2017 Course Information 1 Instructors : Email : arash.rafiey@indstate.edu Office : Root Hall A-127 Office Hours : Tuesdays 11:30 pm 12:30 pm. Root Hall, A127. 2 Course Home Page : http://cs.indstate.edu/~arash/cs256.html

More information

Unit 10. Linux Operating System

Unit 10. Linux Operating System 1 Unit 10 Linux Operating System 2 Linux Based on the Unix operating system Developed as an open-source ("free") alternative by Linux Torvalds and several others starting in 1991 Originally only for Intel

More information

Programming and Data Structure Laboratory (CS13002)

Programming and Data Structure Laboratory (CS13002) Programming and Data Structure Laboratory (CS13002) Dr. Sudeshna Sarkar Dr. Indranil Sengupta Dept. of Computer Science & Engg., IIT Kharagpur 1 Some Rules to be Followed Attendance is mandatory. Regular

More information

You should see something like this, called the prompt :

You should see something like this, called the prompt : CSE 1030 Lab 1 Basic Use of the Command Line PLEASE NOTE this lab will not be graded and does not count towards your final grade. However, all of these techniques are considered testable in a labtest.

More information

EKT332 COMPUTER NETWORK

EKT332 COMPUTER NETWORK EKT332 COMPUTER NETWORK LAB 1 INTRODUCTION TO GNU/LINUX OS Lab #1 : Introduction to GNU/Linux OS Objectives 1. Introduction to Linux File System (Red Hat Distribution). 2. Introduction to various packages

More information

Lab 1 Introduction to UNIX and C

Lab 1 Introduction to UNIX and C Name: Lab 1 Introduction to UNIX and C This first lab is meant to be an introduction to computer environments we will be using this term. You must have a Pitt username to complete this lab. NOTE: Text

More information

Lab 5a Shell Script Lab 4 Using Arithmetic Operators in shell script

Lab 5a Shell Script Lab 4 Using Arithmetic Operators in shell script Lab 5a Shell Script Lab 4 Using Arithmetic Operators in shell script Objective Upon completion of this lab, the student will be able to use arithmetic operators in Linux shell script. Scenario The student

More information

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

SU2017. LAB 1 (May 4/9) Introduction to C, Function Declaration vs. Definition, Basic I/O (scanf/printf, getchar/putchar) SU2017. LAB 1 (May 4/9) Introduction to C, Function Declaration vs. Definition, Basic I/O (scanf/printf, getchar/putchar) 1 Problem A 1.1 Specification Write an ANSI-C program that reads input from the

More information

Manual Eclipse CDT Mac OS Snow Leopard

Manual Eclipse CDT Mac OS Snow Leopard UNVIERSITY OF VICTORIA Manual Eclipse CDT Mac OS Snow Leopard Installation & Demonstration Guide Przemek Lach 9/3/2013 This guide shows how to use install Eclipse and C- Compiler and how to test the setup

More information

Unit 13. Linux Operating System Debugging Programs

Unit 13. Linux Operating System Debugging Programs 1 Unit 13 Linux Operating System Debugging Programs COMPILATION 2 3 Editors "Real" developers use editors designed for writing code No word processors!! You need a text editor to write your code Eclipse,

More information

CSE 351. Introduction & Course Tools

CSE 351. Introduction & Course Tools 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

More information

1.1 Introduction to C Language. Department of CSE

1.1 Introduction to C Language. Department of CSE 1.1 Introduction to C Language 1 Department of CSE Objectives To understand the structure of a C-Language Program To write a minimal C program To introduce the include preprocessor command To be able to

More information

1. The Mac Environment in Sierra Hall 1242

1. The Mac Environment in Sierra Hall 1242 Wednesday, August 26, 2015 Lab Notes Topics for today The Mac Environment C (and Unix) Notes on C Part 1 Program 1 1. The Mac Environment in Sierra Hall 1242 a. Turning on the Mac If the Mac is in sleep

More information

Laboratory 1 Semester 1 11/12

Laboratory 1 Semester 1 11/12 CS2106 National University of Singapore School of Computing Laboratory 1 Semester 1 11/12 MATRICULATION NUMBER: In this lab exercise, you will get familiarize with some basic UNIX commands, editing and

More information

Introduction to C An overview of the programming language C, syntax, data types and input/output

Introduction to C An overview of the programming language C, syntax, data types and input/output Introduction to C An overview of the programming language C, syntax, data types and input/output Teil I. a first C program TU Bergakademie Freiberg INMO M. Brändel 2018-10-23 1 PROGRAMMING LANGUAGE C is

More information

3/13/2012. ESc101: Introduction to Computers and Programming Languages

3/13/2012. ESc101: Introduction to Computers and Programming Languages ESc101: Introduction to Computers and Programming Languages Instructor: Krithika Venkataramani Semester 2, 2011-2012 The content of these slides is taken from previous course lectures of Prof. R. K. Ghosh,

More information

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

COL100 Lab 2. I semester Week 2, Open the web-browser and visit the page   and visit the COL100 course page. COL100 Lab 2 I semester 2017-18 Week 2, 2017 Objective More familiarisation with Linux and its standard commands Part 1 1. Login to your system and open a terminal window. 2. Open the web-browser and visit

More information

1. The Mac Environment in SIE 1222

1. The Mac Environment in SIE 1222 Friday, September 1, 2017 Lab Notes Topics for today The Mac Environment C (and Unix) Notes on C Part 1 Program 1 1. The Mac Environment in SIE 1222 a. Turning on the Mac If the Mac is in sleep mode you

More information

CSCI 161: Introduction to Programming I Lab 1b: Hello, World (Eclipse, Java)

CSCI 161: Introduction to Programming I Lab 1b: Hello, World (Eclipse, Java) Goals - to learn how to compile and execute a Java program - to modify a program to enhance it Overview This activity will introduce you to the Java programming language. You will type in the Java program

More information

Practical Session 0 Introduction to Linux

Practical Session 0 Introduction to Linux School of Computer Science and Software Engineering Clayton Campus, Monash University CSE2303 and CSE2304 Semester I, 2001 Practical Session 0 Introduction to Linux Novell accounts. Every Monash student

More information

Lab 1 Introduction to UNIX and C

Lab 1 Introduction to UNIX and C Name: Lab 1 Introduction to UNIX and C This first lab is meant to be an introduction to computer environments we will be using this term. You must have a Pitt username to complete this lab. The doc is

More information

Linux Systems Administration Shell Scripting Basics. Mike Jager Network Startup Resource Center

Linux Systems Administration Shell Scripting Basics. Mike Jager Network Startup Resource Center Linux Systems Administration Shell Scripting Basics Mike Jager Network Startup Resource Center mike.jager@synack.co.nz These materials are licensed under the Creative Commons Attribution-NonCommercial

More information

Introduction to Algorithms and Programming I Lab. Exercises #1 Solution

Introduction to Algorithms and Programming I Lab. Exercises #1 Solution 60-140 Introduction to Algorithms and Programming I Lab. Exercises #1 Solution Objectives are to: 1. Learn basic Unix commands for preparing a source C program file, compiling a C program and executing

More information

Introduction: The Unix shell and C programming

Introduction: The Unix shell and C programming Introduction: The Unix shell and C programming 1DT048: Programming for Beginners Uppsala University June 11, 2014 You ll be working with the assignments in the Unix labs. If you are new to Unix or working

More information

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

Saint Louis University. Intro to Linux and C. CSCI 2400/ ECE 3217: Computer Architecture. Instructors: David Ferry Intro to Linux and C CSCI 2400/ ECE 3217: Computer Architecture Instructors: David Ferry 1 Overview Linux C Hello program in C Compiling 2 History of Linux Way back in the day: Bell Labs Unix Widely available

More information

User Guide Version 2.0

User Guide Version 2.0 User Guide Version 2.0 Page 2 of 8 Summary Contents 1 INTRODUCTION... 3 2 SECURESHELL (SSH)... 4 2.1 ENABLING SSH... 4 2.2 DISABLING SSH... 4 2.2.1 Change Password... 4 2.2.2 Secure Shell Connection Information...

More information

AP Computer Science A Summer Assignment

AP Computer Science A Summer Assignment Mr. George AP Computer Science A Summer Assignment Welcome to AP Computer Science A! I am looking forward to our class. Please complete the assignment below. It is due on the first day back to school in

More information

University of Maryland College Park Dept of Computer Science CMSC106 Fall 2016 Midterm I

University of Maryland College Park Dept of Computer Science CMSC106 Fall 2016 Midterm I University of Maryland College Park Dept of Computer Science CMSC106 Fall 2016 Midterm I Last Name (PRINT): First Name (PRINT): University Directory ID (e.g., umcpturtle) I pledge on my honor that I have

More information

Read Me First! Start Here. Read Me First! Start Here.

Read Me First! Start Here. Read Me First! Start Here. Getting Started with for Mac OS JAVA Welcome! Hardware Software Disk Space B A S I C S Y S T E M R E Q U I R E M E N T S Classic Mac OS development PowerPC 601 or greater processor (no 68K support), 64

More information

Tutorial No. 2 - Solution (Overview of C)

Tutorial No. 2 - Solution (Overview of C) Tutorial No. 2 - Solution (Overview of C) Computer Programming and Utilization (2110003) 1. Explain the C program development life cycle using flowchart in detail. OR Explain the process of compiling and

More information

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

Lecture 1. A. Sahu and S. V. Rao. Indian Institute of Technology Guwahati Lecture 1 Introduction to Computing A. Sahu and S. V. Rao Dept of Comp. Sc. & Engg. Indian Institute of Technology Guwahati 1 Outline Computer System Problem Solving and Flow Chart Linux Command ls, mkdir,

More information

Physics 306 Computing Lab 1: Hello, World!

Physics 306 Computing Lab 1: Hello, World! 1. Introduction Physics 306 Computing Lab 1: Hello, World! In today s lab, you will learn how to write simple programs, to compile them, and to run them. You will learn about input and output, variables,

More information

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

Week 1, continued. This is CS50. Harvard University. Fall Cheng Gong This is CS50. Harvard University. Fall 2014. Cheng Gong Table of Contents Formula SAE at MIT... 1 Introduction... 1 C... 2 Functions and Syntax... 2 Compilers, Commands, and Libraries... 3 Conditions...

More information

1. The process of writing computer instructions using programming language is called _PROGRAMMING/ CODING

1. The process of writing computer instructions using programming language is called _PROGRAMMING/ CODING 1. The process of writing computer instructions using programming language is called _PROGRAMMING/ CODING 2. After writing the codes, you must COMPILE it so that it will be translated into instructions

More information

Matlab = Matrix Laboratory. It is designed to be great at handling matrices.

Matlab = Matrix Laboratory. It is designed to be great at handling matrices. INTRODUCTION: Matlab = Matrix Laboratory. It is designed to be great at handling matrices. Matlab is a high-level language and interactive environment. You write simple ASCII text that is translated into

More information

Section 2.2 Your First Program in Java: Printing a Line of Text

Section 2.2 Your First Program in Java: Printing a Line of Text Chapter 2 Introduction to Java Applications Section 2.2 Your First Program in Java: Printing a Line of Text 2.2 Q1: End-of-line comments that should be ignored by the compiler are denoted using a. Two

More information

Parallel Programming Pre-Assignment. Setting up the Software Environment

Parallel Programming Pre-Assignment. Setting up the Software Environment Parallel Programming Pre-Assignment Setting up the Software Environment Authors: B. Wilkinson and C. Ferner. Modification date: Aug 21, 2014 (Minor correction Aug 27, 2014.) Software The purpose of this

More information

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

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an

More information

Creating, Compiling and Executing

Creating, Compiling and Executing Shell Commands & Vi Compiling C programs Creating, Compiling and Executing Creating program #i n c l u d e i n t main ( ) { p r i n t f ( AA\n ) ; p r i n t f ( A A\n ) ; p r i n t f ( A

More information

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

Beyond this course. Machine code. Readings: CP:AMA 2.1, 15.4 Beyond this course Readings: CP:AMA 2.1, 15.4 CS 136 Spring 2018 13: Beyond 1 Machine code In Section 04 we briefly discussed compiling: converting source code into machine code so it can be run or executed.

More information

MACS 261J Final Exam. Question: Total Points: Score:

MACS 261J Final Exam. Question: Total Points: Score: MACS 261J Final Exam May 5, 2008 Name: Question: 1 2 3 4 5 6 7 8 9 Total Points: 15 10 15 5 10 5 20 8 12 100 Score: Question 1............................................................. (15 points) (a)

More information

Problem Set 1: Unix Commands 1

Problem Set 1: Unix Commands 1 Problem Set 1: Unix Commands 1 WARNING: IF YOU DO NOT FIND THIS PROBLEM SET TRIVIAL, I WOULD NOT RECOMMEND YOU TAKE THIS OFFERING OF 300 AS YOU DO NOT POSSESS THE REQUISITE BACKGROUND TO PASS THE COURSE.

More information

Linux/Cygwin Practice Computer Architecture

Linux/Cygwin Practice Computer Architecture Linux/Cygwin Practice 2010 Computer Architecture Linux Login Use ssh client applications to connect (Port : 22) SSH Clients zterm ( http://www.brainz.co.kr/products/products4_2.php ) Putty ( http://kldp.net/frs/download.php/3411/hangulputty-0.58.h2.exe

More information

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

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C Welcome! Welcome to your CpSc 111 lab! For each lab this semester, you will be provided a document like this to guide you. This material, as

More information

To install the Texas Instruments CCS Compiler, follow these steps: 1. Go to the TI Wiki page (http://processors.wiki.ti.com/index.

To install the Texas Instruments CCS Compiler, follow these steps: 1. Go to the TI Wiki page (http://processors.wiki.ti.com/index. Installation Guide This document describes the installation procedure for Embed 2017. Main Installer Before you begin the installation, you must install the following on your computer: Texas Instruments

More information

EL2310 Scientific Programming

EL2310 Scientific Programming (yaseminb@kth.se) Overview Overview Roots of C Getting started with C Closer look at Hello World Programming Environment Discussion Basic Datatypes and printf Schedule Introduction to C - main part of

More information

AMCAT Automata Coding Sample Questions And Answers

AMCAT Automata Coding Sample Questions And Answers 1) Find the syntax error in the below code without modifying the logic. #include int main() float x = 1.1; switch (x) case 1: printf( Choice is 1 ); default: printf( Invalid choice ); return

More information

GCC C++: Comment Text

GCC C++: Comment Text GCC C++: Comment Text Introduction Comment text is text included in source code that is ignored by the compiler and does not cause any machine-language object code to be generated. It is written into the

More information

EL2310 Scientific Programming

EL2310 Scientific Programming Lecture 6: Introduction to C (pronobis@kth.se) Overview Overview Lecture 6: Introduction to C Roots of C Getting started with C Closer look at Hello World Programming Environment Schedule Last time (and

More information

Handouts for Lecture 1

Handouts for Lecture 1 Handouts for Lecture 1 October 1 Today s exercise: 1. Answer the questionnaire, which is today s quiz. 2. Install the compiler gcc and gfortran. (For Windows, you will also need to make a path.) 3. Make

More information

IT 374 C# and Applications/ IT695 C# Data Structures

IT 374 C# and Applications/ IT695 C# Data Structures IT 374 C# and Applications/ IT695 C# Data Structures Module 2.1: Introduction to C# App Programming Xianrong (Shawn) Zheng Spring 2017 1 Outline Introduction Creating a Simple App String Interpolation

More information

by Pearson Education, Inc. All Rights Reserved.

by Pearson Education, Inc. All Rights Reserved. Programmers write instructions in various programming languages, some directly understandable by computers and others requiring intermediate translation steps. Computer languages may be divided into three

More information

Getting started with UNIX/Linux for G51PRG and G51CSA

Getting started with UNIX/Linux for G51PRG and G51CSA Getting started with UNIX/Linux for G51PRG and G51CSA David F. Brailsford Steven R. Bagley 1. Introduction These first exercises are very simple and are primarily to get you used to the systems we shall

More information

Parallel Programming Pre-Assignment. Setting up the Software Environment

Parallel Programming Pre-Assignment. Setting up the Software Environment Parallel Programming Pre-Assignment Setting up the Software Environment Author: B. Wilkinson Modification date: January 3, 2016 Software The purpose of this pre-assignment is to set up the software environment

More information

Program Design: Using the Debugger

Program Design: Using the Debugger rogram Design, February 2, 2004 1 Program Design: Using the Debugger A debugger is an alternative to putting print (printf in C) statements in your program, recompiling and trying to find out what values

More information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information Laboratory 2: Programming Basics and Variables Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information 3. Comment: a. name your program with extension.c b. use o option to specify

More information

COMP2121 Introductory Experiment

COMP2121 Introductory Experiment COMP2121 Introductory Experiment Objectives: In this introductory experiment, you will: Learn how to use AVR studio, an Integrated Development Environment (IDE) for developing AVR applications in Windows

More information

Compiler Drivers = GCC

Compiler Drivers = GCC Compiler Drivers = GCC When you invoke GCC, it normally does preprocessing, compilation, assembly and linking, as needed, on behalf of the user accepts options and file names as operands % gcc O1 -g -o

More information

The Command Shell. Fundamentals of Computer Science

The Command Shell. Fundamentals of Computer Science The Command Shell Fundamentals of Computer Science Outline Starting the Command Shell Locally Remote Host Directory Structure Moving around the directories Displaying File Contents Compiling and Running

More information

ENCM 339 Fall 2017: Editing and Running Programs in the Lab

ENCM 339 Fall 2017: Editing and Running Programs in the Lab page 1 of 8 ENCM 339 Fall 2017: Editing and Running Programs in the Lab Steve Norman Department of Electrical & Computer Engineering University of Calgary September 2017 Introduction This document is a

More information

CP Lab 1: Introduction to DICE and the C compiler

CP Lab 1: Introduction to DICE and the C compiler Computer Programming (CP) Lab 1, 2017/18 1 CP Lab 1: Introduction to DICE and the C compiler Instructions The main purpose of this Lab is to teach you to become familiar with the DICE environment this

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #03 The Programming Cycle

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #03 The Programming Cycle Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #03 The Programming Cycle (Refer Slide Time: 00:22) Once we are understood what algorithms are, we will start

More information

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

CMPUT 201: Practical Programming Methodology. Guohui Lin Department of Computing Science University of Alberta September 2018 CMPUT 201: Practical Programming Methodology Guohui Lin guohui@ualberta.ca Department of Computing Science University of Alberta September 2018 Lecture 1: Course Outline Agenda: Course calendar description

More information

Chapter 2. Editing And Compiling

Chapter 2. Editing And Compiling Chapter 2. Editing And Compiling Now that the main concepts of programming have been explained, it's time to actually do some programming. In order for you to "edit" and "compile" a program, you'll need

More information

This document describes the installation procedure for Embed-SE (Simulation Edition)

This document describes the installation procedure for Embed-SE (Simulation Edition) Installation Guide This document describes the installation procedure for Embed-SE (Simulation Edition) 2016.3. Main Installer Before you begin the installation, please read step 7. If you will be using

More information

CS1600 Lab Assignment 1 Spring 2016 Due: Feb. 2, 2016 POINTS: 10

CS1600 Lab Assignment 1 Spring 2016 Due: Feb. 2, 2016 POINTS: 10 CS1600 Lab Assignment 1 Spring 2016 Due: Feb. 2, 2016 POINTS: 10 PURPOSE: The purpose of this lab is to acquaint you with the C++ programming environment on storm. PROCEDURES: You will use Unix/Linux environment

More information

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

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016 Linux Boot Camp Jack, Matthew, Nishad, Stanley 6 Sep 2016 1 Connecting SSH Windows users: MobaXterm, PuTTY, SSH Tectia Mac & Linux users: Terminal (Just type ssh) andrewid@shark.ics.cs.cmu.edu 2 Let s

More information

CST Lab 2 Review #1

CST Lab 2 Review #1 CST8177 - Lab 2 Review #1 Student Name Student number Section Objectives To review command line features, file system access, and permissions Lab Outcome A review of working with the command line A review

More information

Topic 6: A Quick Intro To C

Topic 6: A Quick Intro To C Topic 6: A Quick Intro To C Assumption: All of you know Java. Much of C syntax is the same. Also: Many of you have used C or C++. Goal for this topic: you can write & run a simple C program basic functions

More information

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou EECS 2031 - Software Tools Lab 2 Tutorial: Introduction to UNIX/Linux Tilemachos Pechlivanoglou (tipech@eecs.yorku.ca) Sep 22 & 25, 2017 Material marked with will be in your exams Sep 22 & 25, 2017 Introduction

More information

Unix and C Program Development SEEM

Unix and C Program Development SEEM Unix and C Program Development SEEM 3460 1 Operating Systems A computer system cannot function without an operating system (OS). There are many different operating systems available for PCs, minicomputers,

More information

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

BIL 104E Introduction to Scientific and Engineering Computing. Lecture 14 BIL 104E Introduction to Scientific and Engineering Computing Lecture 14 Because each C program starts at its main() function, information is usually passed to the main() function via command-line arguments.

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

p1: Fortune 1. Overview 2. Learning Goals 3. Logistics 4. Linux commands

p1: Fortune 1. Overview 2. Learning Goals 3. Logistics 4. Linux commands p1: Fortune 1. Overview The Caesar cipher is a very simple way of encoding messages. The idea is that each character (that is a lowercase letter) in the original (or plaintext) message is shifted forward

More information

Chapter 2. Basics of Program Writing

Chapter 2. Basics of Program Writing Chapter 2. Basics of Program Writing Programs start as a set of instructions written by a human being. Before they can be used by the computer, they must undergo several transformations. In this chapter,

More information

Guided Tour (Version 3.3) By Steven Castellucci as Modified by Brandon Haworth

Guided Tour (Version 3.3) By Steven Castellucci as Modified by Brandon Haworth Guided Tour (Version 3.3) By Steven Castellucci as Modified by Brandon Haworth This document was inspired by the Guided Tour written by Professor H. Roumani. His version of the tour can be accessed at

More information

Using the Dev C++ Compiler to Create a Program

Using the Dev C++ Compiler to Create a Program This document assumes that you have already installed the Dev-C++ Compiler on your computer and run it for the first time to setup the initial configuration. USING DEV-C++ TO WRITE THE POPULAR "HELLO WORLD!"

More information

Refresher workshop in programming for polytechnic graduates General Java Program Compilation Guide

Refresher workshop in programming for polytechnic graduates General Java Program Compilation Guide Refresher workshop in programming for polytechnic graduates General Java Program Compilation Guide Overview Welcome to this refresher workshop! This document will serve as a self-guided explanation to

More information

CprE Computer Architecture and Assembly Level Programming Spring Lab-2

CprE Computer Architecture and Assembly Level Programming Spring Lab-2 CprE 381 - Computer Architecture and Assembly Level Programming Spring 2017 Lab-2 INTRODUCTION: This introductory lab is aimed at introducing you to the Simplescalar simulator, while letting you explore

More information

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang For this class you need to work from your grove account to finish your homework Knowing basic UNIX commands is essential to finish your homework

More information

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso A layer of software that runs between the hardware and the user. Controls how the CPU, memory and I/O devices work together to execute programs Keeps

More information

Programming Studio #1 ECE 190

Programming Studio #1 ECE 190 Programming Studio #1 ECE 190 Programming Studio #1 Announcements In Studio Assignment Introduction to Linux Command-Line Operations Recitation Floating Point Representation Binary & Hexadecimal 2 s Complement

More information

CSC111 Computer Science II

CSC111 Computer Science II CSC111 Computer Science II Lab 1 Getting to know Linux Introduction The purpose of this lab is to introduce you to the command line interface in Linux. Getting started In our labs If you are in one of

More information

Lab Working with Linux Command Line

Lab Working with Linux Command Line Introduction In this lab, you will use the Linux command line to manage files and folders and perform some basic administrative tasks. Recommended Equipment A computer with a Linux OS, either installed

More information

This course has three parts. Elements of C programming. Arithmatic and Error analysis. Some algorithms and their implementation

This course has three parts. Elements of C programming. Arithmatic and Error analysis. Some algorithms and their implementation This course has three parts Elements of C programming. Arithmatic and Error analysis. Some algorithms and their implementation 2 There are three steps involved in converting your idea of what is to be

More information

introduction week 1 Ritsumeikan University College of Information Science and Engineering Ian Piumarta 1 / 20 imperative programming about the course

introduction week 1 Ritsumeikan University College of Information Science and Engineering Ian Piumarta 1 / 20 imperative programming about the course week 1 introduction Ritsumeikan University College of Information Science and Engineering Ian Piumarta 1 / 20 class format 30 minutes (give or take a few) presentation 60 minutes (give or take a few) practice

More information

CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse

CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse Goals - to become acquainted with the Linux/Gnome environment Overview For this lab, you will login to a workstation

More information

AP Computer Science A Summer Assignment

AP Computer Science A Summer Assignment AP Computer Science A Summer Assignment Welcome to AP Computer Science A! I am looking forward to our class. Please complete the assignment below. Email the completed Part I as an attachment to kgeorge@glenridge.org

More information

Python for Astronomers. Week 1- Basic Python

Python for Astronomers. Week 1- Basic Python Python for Astronomers Week 1- Basic Python UNIX UNIX is the operating system of Linux (and in fact Mac). It comprises primarily of a certain type of file-system which you can interact with via the terminal

More information

Engr 123 Spring 2018 Notes on Visual Studio

Engr 123 Spring 2018 Notes on Visual Studio Engr 123 Spring 2018 Notes on Visual Studio We will be using Microsoft Visual Studio 2017 for all of the programming assignments in this class. Visual Studio is available on the campus network. For your

More information

Files and Folders What are Files and Folders Files: This is the Data, Images, and things the user makes

Files and Folders What are Files and Folders Files: This is the Data, Images, and things the user makes Files and Folders What are Files and Folders Files: This is the Data, Images, and things the user makes Folders: where the Data, Images and things are stored in the computer. Some people call Folders Directories.

More information

CS Operating Systems, Fall 2018 Project #0 Description

CS Operating Systems, Fall 2018 Project #0 Description CS314-002 Operating Systems, Fall 2018 Project #0 Description Due: 11:00 A.M., September 5, 2018 I. Project Narrative: The primary objectives in this project are: (1) confirm your account (user name and

More information

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

C Tutorial: Part 1. Dr. Charalampos C. Tsimenidis. Newcastle University School of Electrical and Electronic Engineering. C Tutorial: Part 1 Dr. Charalampos C. Tsimenidis Newcastle University School of Electrical and Electronic Engineering September 2013 Why C? Small (32 keywords) Stable Existing code base Fast Low-level

More information

15-122: Principles of Imperative Computation

15-122: Principles of Imperative Computation 15-122: Principles of Imperative Computation Lab 0 Navigating your account in Linux Tom Cortina, Rob Simmons Unlike typical graphical interfaces for operating systems, here you are entering commands directly

More information

Lab Objectives. 2. Preparations. 3. Signing in. 4. Examining the Host Environment. 5. Part A: Introduction to AVR Studio. 5.

Lab Objectives. 2. Preparations. 3. Signing in. 4. Examining the Host Environment. 5. Part A: Introduction to AVR Studio. 5. Lab 0 1. Objectives Learn how to use AVR studio, an Integrated Development Environment (IDE) for developing AVR applications in Windows environments, to debug and run an AVR assembly program. Understand

More information