CGS3460 Summer 2011 Programming Using C Andrei Todor.

Slides:



Advertisements
Similar presentations
Etter/Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 1 Engineering Problem Solving.
Advertisements

An Introduction to Programming By :- Vishal Hirani B.Tech II year (CSE)
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.
C-Language : Basic Concepts 2013, Fall Pusan National University Ki-Joune Li.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Week 1 Part II Kyle Dewey. Overview Lab The art of programming Basic data types Variable declaration and initialization Data representation.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.
COP 3275 COMPUTER PROGRAMMING USING C Instructor: Diego Rivera-Gutierrez
COSC 120 Computer Programming
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Lecture 14 Go over midterm results Algorithms Efficiency More on prime numbers.
CS211 Data Structures Sami Rollins Fall 2004.
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
SoftwareTools CGS 3460, Lecture 7 Jan 25, 2006 Zhen Yang.
1 I.Introduction to Algorithm and Programming Algoritma dan Pemrograman – Teknik Informatika UK Petra 2009.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
CCSA 221 Programming in C CHAPTER 2 SOME FUNDAMENTALS 1 ALHANOUF ALAMR.
6 Steps of the Programming Process
1 CS 240 Programming in C and UNIX Lecturer: Bob Wilson Office: S Phone:
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Chapter 1 Engineering Problem Solving 1. Hardware and Software 2 A computer is a machine designed to perform operations specified with a set of instructions.
10-2 What is the difference between machine code and C? Why use C? How do execution of C and Matlab programs differ? What are three methods of expressing.
General Computer Science for Engineers CISC 106 Lecture 07 James Atlas Computer and Information Sciences 06/29/2009.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Chapter 3: Completing the Problem- Solving Process and Getting Started with C++ Introduction to Programming with C++ Fourth Edition.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
1 © 2002 John Urrutia. All rights reserved. Qbasic Constructing Qbasic Programs.
INTRODUCTION TO CSCE LAB BASIC OF COMPUTERS, C++, UNIX, AND HELLO WORLD.
C programming and compilers. At least 3 ways to compile C Using gcc in UNIX environment via chaos.cs.auckland.ac.nz Using gcc in Cygwin in Windows Using.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
How to Program? -- Part 1 Part 1: Problem Solving –Analyze a problem –Decide what steps need to be taken to solve it. –Take into consideration any special.
1 Overview of Programming Principles of Computers.
Higher Computing Science 2016 Prelim Revision. Topics to revise Computational Constructs parameter passing (value and reference, formal and actual) sub-programs/routines,
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
CMSC 2021 Software Development. CMSC 2022 Software Development Life Cycle Five phases: –Analysis –Design –Implementation –Testing –Maintenance.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Problem Solving.  Similar to Solving Math Word Problem  Read the Problem  Decide how to go about Solving the Problem  Solve the Problem  Test the.
General Computer Science for Engineers CISC 106 Lecture 03 James Atlas Computer and Information Sciences 6/15/2009.
Software. Introduction n A computer can’t do anything without a program of instructions. n A program is a set of instructions a computer carries out.
Software Engineering Algorithms, Compilers, & Lifecycle.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
DEVRY CIS 170 C I L AB 2 OF 7 D ECISIONS Check this A+ tutorial guideline at decisions For.
ENEE150 Discussion 01 Section 0101 Adam Wang.
The Art of Programming --
Engineering Problem Solving With C An Object Based Approach
1-1 Logic and Syntax A computer program is a solution to a problem.
CGS3460 Summer 2011 Programming Using C
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Algorithm and Ambiguity
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Introduction to Computer Programming
Understand the Programming Process
Problem Solving Techniques
Programming Right from the Start with Visual Basic .NET 1/e
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Understand the Programming Process
For Tutors Introduce yourself.
Learning Intention I will learn about the different types of programming errors.
CSCE 206 Lab Structured Programming in C
ICS103 Programming in C 1: Overview of Computers And Programming
Programming Logic and Design Eighth Edition
Presentation transcript:

CGS3460 Summer 2011 Programming Using C Andrei Todor

Syllabus Class Study Program Homework (25%) Quiz (25%) Midterm(25%) Final(25%)

Computer Programming Program Computer program Problem – General - e.g.: find minimum of a list of numbers – Instance - e.g.: find minimum of 3,4,-1 Solution – General: e.g.: look at each number – Instance: -1

Computer Programming Algorithm – Solution to a general problem – Input: instance of the problem – Output: solution for the instance of general problem Pseudocode – Formal description of steps – E.g. Store the value of the first number Look at each number and if it is smaller than the stored value, replace it Output the stored value

Computer Programming Machine Language – E.g.: Programming language – Between pseudocode and machine language – E.g.: C – Syntax (grammar) Compiler – e. g. gcc Execution

Computer Programming Errors – Syntax – compile time – Logical (bug) – run time Debugger

Overview Solution/AlgorithmProblem Pseudocode Program/Source Code Programming Language (C) Executable Program Machine Language PaperText file Binary file Paper solve English code implement compile Output (Solution to problem instance) execute Input Data (Problem instance)

Programming Environment Get class account – – UNIX servers thunder.cise.ufl.edu storm.cise.ufl.edu

Programming environment Remote terminal access Remote file transfer EditorCompilerIDE UNIX – local (CISE labs) NA emacs gedit gccKDevelop UNIX – remote (other Unix computers) local, ssh,sftpemacsgccNA Windows&UNIXPuttyWinSCPemacsgccNA WindowsNA VimMinGWDev-C++ Visual Studio

Basic UNIX Use Putty to connect to thunder Working directory: pwd, cd,. Up directory:.. Home directory: ~

First C program emacs hello.c CTRL+X CTRL+C to save gcc hello.c Execute gcc argument –o Details of gcc – Preprocessing – Compilation – Link-editing

C syntax BNF ::= ::= [ ] ::= |… ::= #include >

C syntax ::= [ ] ::= ::= ::= { [declarations][ ] }

C syntax ::= [ ] ::= ; | |… ::= | |…

C syntax ::= |… ::= ::= ([,…]) ::=return

C Syntax ::= | ::=[-]digits[.][digits] ::= [ ] ::=0|1|…|9 ::=“ ” ::= ::=A|B|…|z|0|…|9|(|)|!| |.|*|…