1. Introduction. March 7, 2011
|
|
- Coleen Young
- 6 years ago
- Views:
Transcription
1 March 7, 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 41
2 Outline The Course The Motivation The Introduction What is a computer? von-neuman architecture What is a high-level language? bytecode, intermediate languages, and the real world Where does it all come from? historic overview & the software crisis The Development Workflow: Algorithms, Tools, and Activities Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 2 of 41
3 1.1. The Course There ain t no such thing as a free lunch. R. A. Heinlein, The Moon Is a Harsh Mistress Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 3 of 41
4 The Course The Motivation Introduction Development Workflow Course Concept Through C/C++ in a rush with three slots a 45 minutes per day. Lecture gives you a deeper understanding of underlying mechanisms, i.e. you won t lear programming here but you ll learn how to learn to program. Provide some exercises in the afternoon which are not mandatory. However, programming means training! Einfu hrung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 4 of 41
5 Didactic Concept In theory there is no difference between theory and practice. In practice there is. Yogi Berra Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 5 of 41
6 The Course The Motivation Introduction Development Workflow After the Course Through C/C++ in a rush with three slots a 45 minutes per day. Lecture gives you a deeper understanding of underlying mechanisms, i.e. you won t lear programming here but you ll learn how to learn to program. Provide some exercises in the afternoon which are not mandatory. However, programming means training! We ll provide the slides of the lecture. Temple Church, London However, not everything is on the slides, i.e. we might write lots of stuff to the blackboard. Einfu hrung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 6 of 41
7 Didactic Concept We run through C/C++ in a rush with, so you have to train. We ll provide the slides of the lecture. However, not everything is on the slides, i.e. we might write lots of stuff to the blackboard. There ll be (very small) exercises in the lecture, so feel free to bring your laptop along, but Close your ****ing Skype, Thunderbird, ICQ, whatever. Ask if you have questions. Otherwise, be prepared that I ask questions. Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 7 of 41
8 The Course The Motivation Introduction Development Workflow Organisation & Concept Register at TUMOnline for the exam. Registration is open from March 7 to March 20. You have to attend neither the lecture nor the tutorial to pass or to be allowed to take part in the exam. This is our idea of a service-oriented university. You ll have to be prepared seriously to pass the exam! If you are searching for data and information, consult the course webpage first. This is your job, not ours. Einfu hrung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 8 of 41
9 The Guttenberg Slide Martin Fowler: Refactoring Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides. Design Patterns: Elements of Reusable Software Randall Hyde: Write Great Code I: Understanding the machine Randall Hyde: Write Great Code II: Thinking Low-level, Writing High-level Scott Meyers. Effective C++ Scott Meyers. More Effective C++ Walter Savitch. Absolute C++ Bjarne Stroustrup. The C++ Programming Language Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 9 of 41
10 1.2. The Motivation... about the Leaning Tower Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 10 of 41
11 The two pillars of science Theory Experiment What happens if these pillars can t be realised or should not be realised? Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 11 of 41
12 The three pillars of science Theory Simulation Experiment Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 12 of 41
13 The Scientific Workflow an Iterative Scheme Numerical Experiments Postprocessing Modelling Numerical Treatment Design of Software Visualisation Tests Implementation Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 13 of 41
14 Scientific Software Crisis PITAC report 2005: Today s CSE ecosystem is unbalanced, with a software base that is inadequate to keep pace with and support evolving hardware and application needs. PITAC report 2005 It is consequently of uttermost importance to have skilled and trained programmers. Programming comprises both a craft and an art, and, hence, coding is not just an unimportant task which can be left to less intelligent henchmen. Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 14 of 41
15 However... PITAC report 2005: Today s CSE ecosystem is unbalanced, with a software base that is inadequate to keep pace with and support evolving hardware and application needs. It is consequently of uttermost importance to have skilled and trained programmers. Programming comprises both a craft and an art, and, hence, coding is not just an unimportant task which can be left to less intelligent henchmen. Almost everybody almost all the time: I agree but in my case it s different. I have better/more urgent things to do than to think about software as, before, I have to understand the underlying physical/technological/medical principles. Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 15 of 41
16 A Success Story Sorry About the Sarcasm Nature 447: In 2006, data from the array led a team of scientists to the surprising conclusion that the world s oceans had cooled during 2003 exceptionally warm years in terms of global surface temperature. The team published its findings in Geophysical Research Letters[1]. Such apparent cooling was seized on by people keen to highlight the uncertainties in forecasts of global warming[2]. That cooling has now been shown to be an artefact. In some of the buoys they are manufactured in separate batches a software glitch caused the temperature and salinity data to be associated with the wrong depths. When the problem data are excluded from the analysis, the cooling trend drops below the level of statistical significance. (pp. 7140) Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 16 of 41
17 Why Matlab sometimes doesn t work Herb Sutter. The free lunch is over: A fundamental turn toward concurrency in software, Dr. Dobb s Journal, 30(3), Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 17 of 41
18 Statements More and more insight will stem from simulations. New insight requires more computing power. More computing power will result from parallelism and other hardware stuff. Mathematicians, engineers, physicians, etc. will write the applications the computer guys write web apps and earn tons of bucks with Google & Co. If you wanna use a tool, you have to lear how to handle it. So learn C/C++/Fortran, and, more important, understand what s happening there. Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 18 of 41
19 1.3. Introduction A Turing Machine ALU IO Memory If we wanna handle a car/machine (efficiently), we have to know how it works. That doesn t mean that we have to be able to construct a car/machine ourselves. Computer (von-neumann architecture): ALU, Memory, IO Controller, Bus Processor (Very) simple binary operations such as add, increment,... Takes one or two numbers, combines them, and writes back result to memory Has a program counter holding one number Memory Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 19 of 41
20 Memory Processor ALU 21: 22; Memory (Very) simple binary operations such as add, increment,... Takes one or two numbers, combines them, and writes back result to memory Has a program counter holding one number IO 23; 24; 4 25; 5 26; 27; 28: Memory Long linear sequence of post its (storage locations) Sequence of storage locations holds natural numbers Storage locations are enumerated Example: Add entry 24 and entry 25 and write result back to entry 21 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 20 of 41
21 A First Machine Code Processor ALU 21: 22; Memory (Very) simple binary operations such as add, increment,... Takes one or two numbers, combines them, and writes back result to memory Has a program counter holding one number IO 23; 24; 4 25; 5 26; 27; 28: Memory Long linear sequence of post its (storage locations) Sequence of storage locations holds natural numbers Storage locations are enumerated Example: Add entry 24 and entry 25 and write result back to entry 21 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 21 of 41
22 Program Counter Processor PC: 113 ALU Memory 21: 22; 23; 24; 4 25; 5 26; 27; 28: 113: add 114; ; ; 21 (Very) simple binary operations such as add, increment,... Takes one or two numbers, combines them, and writes back result to memory Has a program counter holding one number Memory Computer program is a sequence of natural numbers Each number equals command (code) Program counter tells ALU which command to execute next Program counter incremented after each command Random access memory machine RAM machine Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 22 of 41
23 Instruction Streams PC: 113 ALU 21: 22; 23; 24; 4 25; 5 26; 27; 28: Memory 113: add 114; ; ; 21 Properties of machine instructions Code, i.e. number-to-command mapping, is machine-specific Set of available commands is machine-specific Constraints on codes (which codes are allowed when) are machine-specific Performance of a command is machine-specific Writing machine code Cumbersome (small number of directives) Error-prone Not portable We need a more abstract program description (programming language). Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 23 of 41
24 Algorithm An algorithm is a method/recipe expressed as finite list of effective instructions/actions for calculating a function/solving a problem. Where do we find algorithms on a daily basis? Abu Abdullah Muhammad bin Musa al-khwarizmi Persian mathematician, A.D. Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 24 of 41
25 Cooking Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 25 of 41
26 Cooking by Isaac Nassi and Ben Shneiderman Open Door of Appartment All guys enter room Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 26 of 41
27 Cooking by Isaac Nassi and Ben Shneiderman Open Door of Appartment All guys enter room Hungry? Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 27 of 41
28 Cooking by Isaac Nassi and Ben Shneiderman Open Door of Appartment All guys enter room No Hungry? Yes Call Pizza service Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 28 of 41
29 Cooking by Isaac Nassi and Ben Shneiderman Open Door of Appartment All guys enter room No Hungry? Yes For each buddy Open a beer Call Pizza service Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 29 of 41
30 Create your own diagram Write down a Nassi Shneiderman diagram (belonging to structured programming) for the following formula: s(n) = k k with n mod k = 0. Hint: Just run over all k and find out whether they fit into n. Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 30 of 41
31 Translation Concepts Algorithm Compiler (Translator) Compiler (Translator) To be done once Machine Code To be done for each architecture Sell/give it to the customer Install it on the computer Intermediate Code Sell/give it to the customer Install it on the computer Interpreter (Simultan Translator) Machine Code Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 31 of 41
32 A Compiler is a big translation table, i.e. a = 4; b = 5; c = a + b becomes move 4 to 24 move 5 to 25 add to does all the management and linearisation of the memory stream... provides more abstract commands than the machine language can do... manages the program counter... and does a lot more Each real computer scientist has to invent at least one new language and write the corresponding compiler once in his/her lifetime! Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 32 of 41
33 History of C Origins (1970s) Zoo of languages & compilers Among them A and B (Ken Thompson, invented UNIX) Use to write operating systems History of C 1972, Dennis M. Ritchie, Bell Laboratories, AT&T 1973/74, Brian W. Kernighan Purpose: Write operating systems and compilers Fundamental concepts of C Powerful to write an operation system Small number of commands Structuredness (no sequences of assembler code) State of C Used to write UNIX General purpose language Available on all UNIX systems Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 33 of 41
34 History of C++ Bjarne Stroustrup Software Crisis (80s) Complex systems, difficult to maintain Lack of abstraction Lack of modelling facilities Smalltalk and the OOP History of C++ early 80s, Bjarne Stroustrup, Bell Laboratories, AT&T extension of C, i.e. C programs are C++ programs with new ideas of OOP Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 34 of 41
35 C++ State of the Art? PC: 113 ALU Memory 21: 22; 23; 24; 4 25; 5 26; 27; 28: 113: add 114; ; ; 21 Popular languages such as Java or C# are C + + They now adopt concepts of C++ formerly deprecated New paradigms are discussed, but have to stand the test of time Next generation C++0x is not yet released Many application areas (in particular HPC and Scientific Computing) have not yet fully adopted and understood OOP and C++ This course teaches C++ from scratch. However, it does not follow the historic path neither does it start directly with sophisticated OOP concepts. It rather follows the academic path, i.e. introduces one fundamental concept at a time. As OOP (as a concept) still is considered to be sophisticated in our disciplines, it will be the last thing we talk about. Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 35 of 41
36 1.4. Development Workflow Three Tools Coin Our Work Editor (vi, Emacs, Notepad, whatever) to write simple text files Compiler (g++) invoked on the command line Linker (g++) invoked on the command line Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 36 of 41
37 If Programming Were Cooking... Editor (vi, Emacs, Notepad, whatever)... we would write down with the editor the recipe of one single dish such as the dessert or the main course. The recipe then is the algorithm and it is written down as source code which is typically a simple text file with the extensions.c,.cpp, and so forth. Compiler (g++) Linker (g++) Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 37 of 41
38 If Programming Were Cooking... Editor (vi, Emacs, Notepad, whatever) Compiler (g++)... would take the recipe (source code) and cook it. The results are called object code or object files. They typically have the extension.o. It is invoked by g++ -c filename.c. Linker (g++) Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 38 of 41
39 If Programming Were Cooking... Editor (vi, Emacs, Notepad, whatever) Compiler (g++) Linker (g++)... would take the individual dishes and combine them into a complete meal with several courses. It is invoked by g++ filename1.o filename2.o -o outputfile and produces an executable.... there would be a menu card given by several header text files as well. They typically have the extension.h or.hpp. Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 39 of 41
40 Standard Workflow Write down your source codes (files file1.cpp, file2.cpp,...) into text files with an editor of your choice Write down your descriptions (files file1.h, file2.h,...) (we will do this later as it is a matter of style) into text files with an editor of your choice Open your command line and type g++ -c file1.cpp g++ -c file2.cpp g++ file1.o file2.o myappl./myappl produces file1.o produces file2.o produces executable myappl execute myappl Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 40 of 41
41 Exercise vi first-appl.cpp # i n c l u d e <iostream> i n t main ( ) { std : : cout << Hello yourname ; r e t u r n 0; } g++ -c first-appl.cpp ls g++ first-appl.o -o myappl ls./myappl Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 41 of 41
1. Introduction. 27. Juni 2011
27. Juni 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 41 Outline The Course The Motivation The Introduction What is a computer? von-neuman architecture What is
More information11. Generic Programming and Design Patterns. 8. Juli 2011
8. Juli 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 26 Outline Recapitulation Template Programming An Overview over the STL Design Patterns (skipped) Evaluation/feedback
More information5. Applicative Programming. 1. Juli 2011
1. Juli 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 41 Outline Recapitulation Computer architecture extended: Registers and caches Header files Global variables
More informationIntroduction to Basis and Practice in Programming
Introduction to Basis and Practice in Programming Fall 2015 Jinkyu Jeong (jinkyu@skku.edu) 1 Course Overview Course Basics! Class hour GEDB029-45: Mon. 13:00 ~ 14:50 GEDB029-46: Tue. 13:00 ~ 14:50 1~2
More information2. Variables, Identifiers, and Expressions. March 8, 2011
March 8, 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 34 Outline A Movie Structure of Simple C Codes Comments & Documentation Variables & Identifiers Built-in
More informationby 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 informationPROGRAMMAZIONE I A.A. 2017/2018
PROGRAMMAZIONE I A.A. 2017/2018 PROGRAMMING LANGUAGES A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output. Programming languages
More information0 Introduction: Computer systems and program development
0 Introduction: Computer systems and program development Outline 1 Introduction 2 What Is a Computer? 3 Computer Organization 4 Evolution of Operating Systems 5 Personal Computing, Distributed Computing
More informationWhat is a programming language?
Overview Introduction Motivation Why study programming languages? Some key concepts What is a programming language? What is a programming language?...there is no agreement on what a programming language
More informationFundamentals of Programming. Lecture 1: Introduction to C Programming
1 Fundamentals of Programming Lecture 1: Introduction to C Programming Instructor: Fatemeh Zamani f_zamani@ce.sharif.edu Sharif University of Technology Computer Engineering Department 2 Outline Grading
More informationCOSC 2P95. Introduction. Week 1. Brock University. Brock University (Week 1) Introduction 1 / 18
COSC 2P95 Introduction Week 1 Brock University Brock University (Week 1) Introduction 1 / 18 Lectures and Labs Lectures are Thursdays, from 3pm 5pm (AS/STH 217) There are two lab sections Lab 1 is Mondays,
More informationAdministration Computers Software Algorithms Programming Languages
Administration Computers Software Algorithms Programming Languages http://www.cs.sfu.ca/cc/130/johnwill/ This course does not use Canvas John Edgar 3 Come to class Read ahead Attend the labs You get practice
More informationCS240: Programming in C
CS240: Programming in C Lecture 1: Class overview. Cristina Nita-Rotaru Lecture 1/ Fall 2013 1 WELCOME to CS240 Cristina Nita-Rotaru Lecture 1/ Fall 2013 2 240 Team Instructor: Cristina Nita-Rotaru Special
More informationEL2310 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 informationIntroduction to Programming
Introduction to Programming session 3 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2010 These slides are created using Deitel s slides Sahrif University of Technology Outlines
More informationObject Oriented Concepts and Programming (CSC244) By Dr. Tabbasum Naz
Object Oriented Concepts and Programming (CSC244) By Dr. Tabbasum Naz tabbasum.naz@ciitlahore.edu.pk Course Outline Course Title Object Oriented Concepts and Course Code Credit Hours 4(3,1) Programming
More informationPrinciples of computer programming. Profesor : doc. dr Marko Tanasković Assistent : doc. dr Marko Tanasković
Principles of computer programming Profesor : doc. dr Marko Tanasković Assistent : doc. dr Marko Tanasković E-mail: mtanaskovic@singidunum.ac.rs Course organization Lectures: Presentation of concepts and
More informationChapter 1 Introduction to Computers and C++ Programming
Chapter 1 Introduction to Computers and C++ Programming 1 Outline 1.1 Introduction 1.2 What is a Computer? 1.3 Computer Organization 1.7 History of C and C++ 1.14 Basics of a Typical C++ Environment 1.20
More informationSpring 2018 NENG 202 Introduction to Computer Programming
Spring 2018 NENG 202 Introduction to Computer Programming Introductory programming course based on the C language Course Website: http://www.albany.edu/~yx152122/neng202-18.html Instructor: Prof. Y. Alex
More informationCS 50 Introduction to Computer Science I
CS 50 Introduction to Computer Science I Michael D. Smith smith@eecs.harvard.edu Fall 2005 CS50 1 Q1: What s in common? Internet commerce and electronic markets Blockbuster movies and their special effects
More informationIntroduction to Linux
Why Linux? Nothing is hidden (opensource is good for education) It runs anywhere, on almost anything Android, OS X, Raspberry Pi, Old PCs Low resource requirements You are likely to use it in your job,
More informationLecture 1: Preliminaries
Lecture 1: Preliminaries Edgardo Molina Department of Computer Science City College of New York August 30, 2011 Edgardo Molina (CS@CCNY) Lecture 1 August 30, 2011 1 / 44 Info and Schedule Course Info and
More informationRules. Solution. Telling a computer how to behave: intro to algorithms + pseudocode. Today. Steps in solving a computational task
Today n Binary! n Intro to algorithms and pseudocode n Discussion of readings Reminders: Leading discussions Blog posts! Bring laptops with face project ready to show off on Thursday. Telling a computer
More informationPROPOSAL TO INTRODUCE A NEW COURSE
PROPOSAL TO INTRODUCE A NEW COURSE 1. COURSE DETAILS 1.1 Course ID COMP3021 1.2 Course name -- Long Object-Oriented Programming 1.3 Course name -- Abbreviated OOP 1.4 Course Authority Assoc. Professor
More informationIntroduction to C Programming
13205 C Programming Lecture 1-26/Sept/2017 c 2017 Abel Gomes All Rights Reserved Introduction to C Programming Scribe: A. Gomes This lecture aims to respond to the following questions: Why do we need to
More informationScientific Computing
Scientific Computing Martin Lotz School of Mathematics The University of Manchester Lecture 1, September 22, 2014 Outline Course Overview Programming Basics The C++ Programming Language Outline Course
More informationPlan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve?
Plan Design principles: laughing in the face of change Perdita Stevens School of Informatics University of Edinburgh What are we trying to achieve? Review: Design principles you know from Inf2C-SE Going
More informationHarvard-MIT Division of Health Sciences and Technology HST.952: Computing for Biomedical Scientists HST 952. Computing for Biomedical Scientists
Harvard-MIT Division of Health Sciences and Technology HST.952: Computing for Biomedical Scientists HST 952 Computing for Biomedical Scientists Introduction Medical informatics is interdisciplinary, and
More information(0) introduction to the course. how to learn a programming language. (0) course structure
topics: (0) introduction to the course (1) what is a computer? instructor: cis1.5 introduction to computing using c++ (robotics applications) spring 2008 lecture # I.1 introduction Prof Azhar, mqazhar@sci.brooklyn.cuny.edu
More informationComputer Fundamentals: Pradeep K. Sinha & Priti Sinha
Computer Fundamentals Pradeep K. Sinha Priti Sinha Chapter 12 Computer Languages Slide 1/64 Learning Objectives In this chapter you will learn about: Computer languages or programming languages Three broad
More informationCS120 Computer Science I. Instructor: Jia Song
CS120 Computer Science I Instructor: Jia Song Instructor Contact Information Instructor: Dr. Jia Song Email: jsong@uidaho.edu (Preferred) Phone: (208) 885-1710 Office: JEB 240 (CSDS Security Lab) JEB 340
More informationIntroduction to C++ Dr M.S. Colclough, research fellows, pgtas
Introduction to C++ Dr M.S. Colclough, research fellows, pgtas 5 weeks, 2 afternoons / week. Primarily a lab project. Approx. first 5 sessions start with lecture, followed by non assessed exercises in
More information6. Pointers, Structs, and Arrays. 1. Juli 2011
1. Juli 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 50 Outline Recapitulation Pointers Dynamic Memory Allocation Structs Arrays Bubble Sort Strings Einführung
More information4. Functions. March 10, 2010
March 10, 2010 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 40 Outline Recapitulation Functions Part 1 What is a Procedure? Call-by-value and Call-by-reference Functions
More information6. Pointers, Structs, and Arrays. March 14 & 15, 2011
March 14 & 15, 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 47 Outline Recapitulation Pointers Dynamic Memory Allocation Structs Arrays Bubble Sort Strings Einführung
More informationChapters 1 & 2 Programming and Programs
Chapters 1 & 2 Programming and Programs Instructor: Dr. Hyunyoung Lee Based on slides by Dr. Bjarne Stroustrup www.stroustrup.com/programming Abstract Today, we ll outline the aims for this course and
More informationLECTURE/ STUDY NOTES ON C
LECTURE/ STUDY NOTES ON C PART I (Overview of C Programming) Introduction of C language History of C Importance of C Demerits of C Basic Structure of C Working steps of C compiler Source Code Object Code
More information! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to Computing and Programming with Java: A Multimedia
More informationCS 240 Fall 2015 Section 004. Alvin Chao, Professor
CS 240 Fall 2015 Section 004 Alvin Chao, Professor Today Course overview Data Structures / Algorithms Course policies The C language Motivation Computers are digital Data is stored in binary format (1's
More informationWelcome to. Instructor Marc Pomplun CS 470/670. Introduction to Artificial Intelligence 1/26/2016. Spring Selectivity in Complex Scenes
Welcome to CS 470/670 Introduction to Artificial Intelligence Office: Lab: Instructor Marc Pomplun S-3-171 S-3-135 Office Hours: Tuesdays 4:00pm 5:30pm Thursdays 7:00pm 8:30pm Spring 2016 Instructor: Marc
More informationLecture 5: The Halting Problem. Michael Beeson
Lecture 5: The Halting Problem Michael Beeson Historical situation in 1930 The diagonal method appears to offer a way to extend just about any definition of computable. It appeared in the 1920s that it
More informationFundamentals of Programming (C)
Borrowed from lecturer notes by Omid Jafarinezhad Fundamentals of Programming (C) Group 6 Lecturer: Vahid Khodabakhshi CE 40153 - Fall 97 Lecture 1 Introduction and Brief History Department of Computer
More informationCSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I
CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I Lecture 1: Class Introduction DR. BO TANG ASSISTANT PROFESSOR HOFSTRA UNIVERSITY 1 9/7/16 CSC15 - Python OUTLINE What is Computer Science? What is this Class
More informationComputers 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 informationUnit. Programming Fundamentals. School of Science and Technology INTRODUCTION
INTRODUCTION Programming Fundamentals Unit 1 In order to communicate with each other, we use natural languages like Bengali, English, Hindi, Urdu, French, Gujarati etc. We have different language around
More informationWhat is the Best Way for Children to Learn Computer Programming?
What is the Best Way for Children to Learn Computer Programming? Dr Alex Davidovic One of the defining characteristics of today s society is that the computers and mobile devices are the integral and natural
More informationProblem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur
Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Introduction to Programming Language Concepts
More informationDesign Patterns. CSC207 Fall 2017
Design Patterns CSC207 Fall 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe the
More informationComponent V Supporting Materials / Learn More Interesting Facts. Interesting Facts
Component V Supporting Materials / Learn More 1.4.1 Interesting Facts No. Interesting Facts 1. All computers operate by following machine language programs. 2. Machine language programs are long sequence
More informationAn Introduction to Software Engineering. David Greenstein Monta Vista High School
An Introduction to Software Engineering David Greenstein Monta Vista High School Software Today Software Development Pre-1970 s - Emphasis on efficiency Compact, fast algorithms on machines with limited
More informationC++ For Programmers By Paul J. Deitel, Harvey M. Deitel
C++ For Programmers By Paul J. Deitel, Harvey M. Deitel Welcome to the C++ Tutorial! This tutorial is intended for students who are already familiar with Java and with data structures, and are interested
More informationAggregation headers. Introduction
Aggregation headers N2905=09-0095 2009-06-18 Bjarne Stroustrup Abstract I propose two new standard headers and which are aggregations of other headers. The purpose of the first
More informationCSCI170 Lecture 1: Analysis of Programming Languages. John Magee 1 September 2011 Some material copyright Jones and Bartlett
CSCI170 Lecture 1: Analysis of Programming Languages John Magee 1 September 2011 Some material copyright Jones and Bartlett 1 Overview/Questions How can we control the computer s circuits? How does the
More informationIntroduction to Programming
Introduction to Programming Lecture 1 Object-Oriented Programming Agenda What is Program? Ideal Computing Way Where We Are in Computers? Interaction with the Computer Where are we going? Programming and
More informationassembler Machine Code Object Files linker Executable File
CSCE A211 Programming Intro What is a Programming Language Assemblers, Compilers, Interpreters A compiler translates programs in high level languages into machine language that can be executed by the computer.
More informationEP241 Computer Programming
EP241 Computer Programming Topic 1 Dr. Ahmet BİNGÜL Department of Engineering Physics University of Gaziantep Modifications by Dr. Andrew BEDDALL Department of Electric and Electronics Engineering Sep
More informationC++ Spring Break Packet 11 The Java Programming Language
C++ Spring Break Packet 11 The Java Programming Language! Programmers write instructions in various programming languages, some directly understandable by computers and others requiring intermediate translation
More informationChapter 11 :: Functional Languages
Chapter 11 :: Functional Languages Programming Language Pragmatics Michael L. Scott Copyright 2016 Elsevier 1 Chapter11_Functional_Languages_4e - Tue November 21, 2017 Historical Origins The imperative
More informationChapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction
Chapter 1: An Overview of Computers and Programming Languages Objectives Objectives (cont d.) In this chapter, you will: Learn about different types of computers Explore hardware and software Learn about
More informationContents. Slide Set 1. About these slides. Outline of Slide Set 1. Typographical conventions: Italics. Typographical conventions. About these slides
Slide Set 1 for ENCM 369 Winter 2014 Lecture Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2014 ENCM 369 W14 Section
More informationCS 61C: Great Ideas in Computer Architecture Lecture 2: Introduction to C, Part I
CS 61C: Great Ideas in Computer Architecture Lecture 2: Introduction to C, Part I Instructors: Vladimir Stojanovic & Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/ 1 Agenda Everything is a Number
More informationDr. Md. Humayun Kabir CSE Department, BUET
C++ Dr. Md. Humayun Kabir CSE Department, BUET History of C++ Invented by Bjarne Stroustrup at Bell Lab in 1979 Initially known as C with Classes Classes and Basic Inheritance The name was changed to C++
More informationWeek - 01 Lecture - 04 Downloading and installing Python
Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 01 Lecture - 04 Downloading and
More informationYour first C and C++ programs
Your first C and C++ programs Professor Hugh C. Lauer CS-2303, System Programming Concepts (Slides include materials from The C Programming Language, 2 nd edition, by Kernighan and Ritchie, Absolute C++,
More informationWelcome to Solving Problems with Computers I
Welcome to Solving Problems with Computers I CS 16: Solving Problems with Computers I Lecture #1 Ziad Matni Dept. of Computer Science, UCSB Image from agorolabs on slideshare.com A Word About Registration
More informationCSci 160 Computing Science I. Sarah Carruthers Fall 2017
CSci 160 Computing Science I Sarah Carruthers Fall 2017 Administrivia Lecture: Tues. & Thurs. 11:30-1:00, Tues. 4:00-5:00 Instructor: Sarah Carruthers (sarah.carruthers@viu.ca) Office Hours: Mon. 3-4PM,
More informationCOMP1917: Computing 1 1. Introduction
COMP1917: Computing 1 1. Introduction Reading: Moffat, Chapter 1. COMP1917 15s2 Introduction 1 Course Web Site http://www.cse.unsw.edu.au/~cs1917/15s2 Please check this Web Site regularly for updated information,
More informationPlan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve?
Plan Design principles: laughing in the face of change Perdita Stevens School of Informatics University of Edinburgh What are we trying to achieve? Review: Design principles you know from Inf2C-SE Going
More informationIntroduction. A. Bellaachia Page: 1
Introduction 1. Objectives... 2 2. Why are there so many programming languages?... 2 3. What makes a language successful?... 2 4. Programming Domains... 3 5. Language and Computer Architecture... 4 6.
More informationThese are notes for the third lecture; if statements and loops.
These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern
More informationAnnouncements Tues., Aug and 2. to call them ( ) ! For next time, read Learning Computing with Robots, chs.
Announcements Tues., Aug. 24! For next time, read Learning Computing with Robots, chs. 1 and 2.! The Blackboard site is up and operational!! not much content! mostly links back to my course homepage! Printed
More informationCS Prof J.P.Morrison
CS1061 2018-2019 Prof J.P.Morrison C Programming C is the most popular language worldwide. Everything from microcontrollers to operating systems is written in C flexible and versatile, allowing maximum
More informationSpring Modern Computer Science in a Unix Like Environment CIS c
Spring 2009 Modern Computer Science in a Unix Like Environment http://www.seas.upenn.edu/~cis399ux 25/01/09 Slide 1 What is Unix/Linux? Linux itself is an Operating System Kernel Linux is often used to
More informationEECE 321: Computer Organization
EECE 321: Computer Organization Mohammad M. Mansour Dept. of Electrical and Compute Engineering American University of Beirut Lecture 1: Introduction Administrative Instructor Dr. Mohammad M. Mansour,
More information1 Software Architecture
Some buzzwords and acronyms for today Software architecture Design pattern Separation of concerns Single responsibility principle Keep it simple, stupid (KISS) Don t repeat yourself (DRY) Don t talk to
More informationANSI C. Data Analysis in Geophysics Demián D. Gómez November 2013
ANSI C Data Analysis in Geophysics Demián D. Gómez November 2013 ANSI C Standards published by the American National Standards Institute (1983-1989). Initially developed by Dennis Ritchie between 1969
More informationIntroduction to Object-Oriented Programming
1/9 Introduction to Object-Oriented Programming Conception et programmation orientées object, B. Meyer, Eyrolles Object-Oriented Software Engineering, T. C. Lethbridge, R. Laganière, McGraw Hill Design
More informationCPSC 427a: Object-Oriented Programming
CPSC 427a: Object-Oriented Programming Michael J. Fischer Lecture 2 September 6, 2011 CPSC 427a 1/14 C++ Overview C++ Goals Comparison of C and C++ Tools Example Insertion sort C version C++ version CPSC
More information1 Anatomy of a Program 4
Objectives Anatomy of a Program 1E3 To understand the role of basic C++ program elements. To provide a skeleton from which to generate simple programs. 1 Anatomy of a Program 1 1 Anatomy of a Program 2
More informationDesign Patterns. CSC207 Winter 2017
Design Patterns CSC207 Winter 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe
More informationProgramming Languages FILS Andrei Vasilateanu
Programming Languages FILS 2014-2015 Andrei Vasilateanu Course Master: Administration Andrei Vasilateanu, andraevs@gmail.com Teaching Assistants: Radu Serban Grading: Final exam 40% Laboratory 60% 2 Tests
More informationChapter 1: Introduction
Chapter 1: Introduction Outline Introduction What Is a Computer? Computer Hardware Computer Software Computer Programming Languages Machine Code, Assembly Languages and High-Level Languages. The History
More informationBeijing Jiaotong University CS-23: C++ Programming Summer, 2019 Course Syllabus
Beijing Jiaotong University CS-23: C++ Programming Summer, 2019 Course Syllabus Course Personnel: Instructor Name: Jovan Ilić Office: TBD Phone: TBD e-mail: TBD Teaching Assistants Name: TBD Office: TBD
More informationIntroduction to Computer Systems
Introduction to Computer Systems Today: Welcome to EECS 213 Lecture topics and assignments Next time: Bits & bytes and some Boolean algebra Fabián E. Bustamante, Spring 2010 Welcome to Intro. to Computer
More informationCSE 333 Lecture 1 - Systems programming
CSE 333 Lecture 1 - Systems programming Hal Perkins Department of Computer Science & Engineering University of Washington Welcome! Today s goals: - introductions - big picture - course syllabus - setting
More informationCS1100 Introduction to Programming
Course Outline Introduction to Computing CS00 Introduction to Programming Introduction to Computing Programming (in C) Exercises and examples from the mathematical area of Numerical Methods Madhu Mutyam
More informationApplication Architectures, Design Patterns
Application Architectures, Design Patterns Martin Ledvinka martin.ledvinka@fel.cvut.cz Winter Term 2017 Martin Ledvinka (martin.ledvinka@fel.cvut.cz) Application Architectures, Design Patterns Winter Term
More informationSyllabus of ENPM 691: Secure Programming in C
Syllabus of ENPM 691: Secure Programming in C Spring Semester 2018 Instructor: Dharmalingam Ganesan, PhD Contact: dganesan@umd.edu Class hours: Thursday 7:00 PM to 9:40 PM Class location: TBA Course Description:
More informationWhat is programming? What are computer languages and how have they evolved? What is the basic process of programming, including the tools involved?
What is programming? What are computer languages and how have they evolved? What is the basic process of programming, including the tools involved? A step-by-step set of instructions to accomplish a task.
More informationOutline. Logistics. Logistics. Principles of Software (CSCI 2600) Spring Logistics csci2600/
Outline Principles of Software (CSCI 600) Spring 018 http://www.cs.rpi.edu/academics/courses/spring18/csci600/ Konstantin Kuzmin, kuzmik@cs.rpi.edu Office hours: Monday and Thursday 4:00 pm - 5:30 pm Mailing
More informationThe name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.
Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that
More informationDesign Patterns. CSC207 Fall 2017
Design Patterns CSC207 Fall 2017 Design Patterns A design pattern is a general description of the solution to a well-established problem using an arrangement of classes and objects. Patterns describe the
More informationTutorial-2a: First steps with C++ programming
Programming for Scientists Tutorial 2a 1 / 18 HTTP://WWW.HEP.LU.SE/COURSES/MNXB01 Introduction to Programming and Computing for Scientists Tutorial-2a: First steps with C++ programming Programming for
More informationCSc 2310 Principles of Programming (Java) Jyoti Islam
CSc 2310 Principles of Programming (Java) Jyoti Islam Are you in the right class??? Check the CRN of your registration Instructor Jyoti Islam PhD Student, concentration: Machine Learning 4+ years of Industry
More informationCS 113: Introduction to
CS 113: Introduction to Course information MWF 12:20-1:10pm 1/21-2/15, 306 Hollister Hall Add/drop deadline: 1/28 C Instructor: David Crandall See website for office hours and contact information Prerequisites
More informationParadigms of computer programming
Paradigms of computer programming Louv1.1x and Louv1.2x form a two-course sequence Together they teach programming as a unified discipline that covers all programming languages Second-year university level:
More informationCS 6371: Advanced Programming Languages
CS 6371: Advanced Programming Languages Dr. Kevin Hamlen Spring 2017 Fill out, sign, and return prereq forms: Course number: CS 6371 Section: 1 Prerequisites: CS 5343: Algorithm Analysis & Data Structures
More informationCSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch
CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch Purpose: We will take a look at programming this week using a language called Scratch. Scratch is a programming language that was developed
More informationExercises: Instructions and Advice
Instructions Exercises: Instructions and Advice The exercises in this course are primarily practical programming tasks that are designed to help the student master the intellectual content of the subjects
More informationOperating System Study Material
The operating system works as a mediator between hardware, application software and user. Operating systems are programs that coordinate computer resources, provide an interface between users and the computer,
More information