1 CSSE 332 Course Introduction. Roll Call and Introductions Name (nickname) Name (nickname) Hometown Hometown Local Residence Local Residence Major Major.

Slides:



Advertisements
Similar presentations
Lecture 2 - Introduction Objective C is used primarily for application development on Apple's Mac OS X and iPhone. On the Apple it is used together with.
Advertisements

An Introduction to Programming By :- Vishal Hirani B.Tech II year (CSE)
CPSC 441 TUTORIAL – JANUARY 16, 2012 TA: MARYAM ELAHI INTRODUCTION TO C.
IT 325 OPERATING SYSTEM C programming language. Why use C instead of Java Intermediate-level language:  Low-level features like bit operations  High-level.
C Intro.
C Programming Day 1 based upon Practical C Programming by Steve Oualline CS550 Operating Systems.
Lecture 2 Introduction to C Programming
Introduction to C Programming
C Introduction Lesson CS1313 Spring C Introduction Lesson Outline 1.C Introduction Lesson Outline 2. hello_world.c 3.C Character Set 4.C is Case.
1 Chapter 2 Introduction to Java Applications Introduction Java application programming Display ____________________ Obtain information from the.
C Introduction Lesson CS1313 Spring C Introduction Lesson Outline 1.C Introduction Lesson Outline 2. hello_world.c 3.C Character Set 4.C is Case.
Chapter 1: Introduction
C Programming for engineers Teaching assistant: Ben Sandbank Home page:
1 CS 201 Introduction to C (1) Debzani Deb. 2 Outline Overview of C General form of a C program C Language Elements.
Introduction to C Programming CE Lecture 1 Introduction to C.
Programming The Development Environment and Your First C Program.
1 Lecture 2  Input-Process-Output  The Hello-world program  A Feet-to-inches program  Variables, expressions, assignments & initialization  printf()
CS211 Data Structures Sami Rollins Fall 2004.
Guide To UNIX Using Linux Third Edition
Computer Systems DV1 (1DT151) Operating Systems (1DT020) Cary Laxer, Ph.D. Visiting Lecturer.
An Introduction to C Programming Geb Thomas. Learning Objectives Learn how to write and compile a C program Learn what C libraries are Understand the.
COP 3275 COMPUTER PROGRAMMING USING C Instructor: Diego Rivera-Gutierrez
CPSC 441 Tutorial TA: Fang Wang Introduction to C.
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Introduction to C++ - How C++ Evolved Most popular languages currently: COBOL, Fortran, C, C++, Java (script) C was developed in 1970s at AT&T (Richie)
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 2 - HelloWorld Application: Introduction to.
Gator Engineering 1 Chapter 2 C Fundamentals Copyright © 2008 W. W. Norton & Company. All rights reserved.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
1 Agenda Administration Background Our first C program Working environment Exercise Memory and Variables.
H.Melikian Introduction on C C is a high-level programming language that forms the basis to other programming languages such as C++, Perl and Java. It.
Programming I Introduction Introduction The only way to learn a new programming language is by writing programs in it. The first program to.
Lecture 0 CIS 208 C Language Lab Wed. January 12, 2005.
Programming With C.
History of C 1950 – FORTRAN (Formula Translator) 1959 – COBOL (Common Business Oriented Language) 1971 – Pascal Between Ada.
EPSII 59:006 Spring Introduction to C More Administrative Details The C Programming Language How a computer processes programs Your first C program.
1 Programming in C Hello World! Soon I will control the world! Soon I will control the world!
Computer Programming I Hour 2 - Writing Your First C Program.
Lecture 1 cis208 January 14 rd, Compiling %> gcc helloworld.c returns a.out %> gcc –o helloworld helloworld.c returns helloworld.
Introduction to C 2008/09/29: Lecture 7 CMSC 104, Section 0101 John Y. Park 1.
Department of Electronic & Electrical Engineering Introduction to C - The Development cycle. Why C? The development cycle. Using Visual Studio ? A simple.
Program Development Cycle 1.Edit program 2.Compile program - translates it from C to machine language 3. Run/execute your program. 4. If not satisfied,
Computer Programming A simple example /* HelloWorld: A simple C program */ #include int main (void) { printf (“Hello world!\n”); return.
 2007 Pearson Education, Inc. All rights reserved. A Simple C Program 1 /* ************************************************* *** Program: hello_world.
CSE 303 Concepts and Tools for Software Development Richard C. Davis UW CSE – 10/11/2006 Lecture 7 – Introduction to C.
Introduction to C Programming I Subject: T0016 – ALGORITHM AND PROGRAMMING Year: 2013.
1 Lecture 2 - Introduction to C Programming Outline 2.1Introduction 2.2A Simple C Program: Printing a Line of Text 2.3Another Simple C Program: Adding.
STRUCTURED PROGRAMMING Complete C++ Program. Content 2  Main Function  Preprocessor directives  User comments  Escape characters  cout statement.
KYC - Know your compiler Introduction to GCC
CSC201: Computer Programming
Introduction to C Language
Chapter 2 - Introduction to C Programming
Computer Programming Chapter 1: Introduction
Chapter 2, Part I Introduction to C Programming
Day 01 Introduction to Linux and C
Chapter 2 - Introduction to C Programming
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Chapter 2 - Introduction to C Programming
Chapter 2 - Introduction to C Programming
Introduction to CS Your First C Programs
مباني كامپيوتر و برنامه سازي
Chapter 2 - Introduction to C Programming
Govt. Polytechnic,Dhangar
Creating your first C program
Chapter 2 - Introduction to C Programming
Programming Fundamentals Lecture #3 Overview of Computer Programming
Your first C and C++ programs
Chapter 2 - Introduction to C Programming
EECE.2160 ECE Application Programming
Introduction to C Programming
Zorah Fung University of Washington, Winter 2016
Presentation transcript:

1 CSSE 332 Course Introduction

Roll Call and Introductions Name (nickname) Name (nickname) Hometown Hometown Local Residence Local Residence Major Major Something exciting you did over the break Something exciting you did over the break

Administrivia Background Background Syllabus Syllabus Schedule Schedule First assignment due at start of next class First assignment due at start of next class

4 Why learn C (after Java)? Both high-level and low-level language Both high-level and low-level language Better control of low-level mechanisms Better control of low-level mechanisms Performance better than Java Performance better than Java Java hides many details needed for writing OS code Java hides many details needed for writing OS code But,…. But,…. Memory management responsibility Memory management responsibility Explicit initialization and error detection Explicit initialization and error detection More room for mistakes More room for mistakes

5 Goals of this tutorial To introduce you with some basic C concepts To introduce you with some basic C concepts –you can read further details on your own To expose common mistakes beginners make To expose common mistakes beginners make –you can avoid them and get your assignments done quickly

6 Creating an executable Source:

7 Types of files C source files (.c) C source files (.c) C header files (.h) C header files (.h) Object files (.o) Object files (.o) Executable files (typically no extension – by default : a.out) Executable files (typically no extension – by default : a.out) Library files (.a or.so) Library files (.a or.so)

8 Example 1: HelloWorld #include //#include “myheader.h” int main(){ /* print out a message */ printf(“Hello World. \n \t and you ! \n ”); return 0; }

9 Summarizing the Example #include = include header file stdio.h #include = include header file stdio.h –No semicolon at end –Small letters only – C is case-sensitive int main(){ … } is the only code executed int main(){ … } is the only code executed printf(“ /* message you want printed */ ”); printf(“ /* message you want printed */ ”); \n = newline \t = tab \n = newline \t = tab \ in front of other special characters within printf creates “escape sequences”. \ in front of other special characters within printf creates “escape sequences”. – printf(“Have you heard of \”The Rock\” ? \n”);

10 Compiling and running >gcc HelloWorld.c (Creates a.out) >gcc HelloWorld.c (Creates a.out) >./a.out (Runs the executable) >./a.out (Runs the executable) >gcc HelloWorld.c –o HelloWorld (Creates HelloWorld not a.out) >gcc HelloWorld.c –o HelloWorld (Creates HelloWorld not a.out) >./HelloWorld >./HelloWorld