INTRODUCTION TO C PROGRAMMING LANGUAGE 350142-Computer Programming Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Introduction to JavaScript
INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
Coding and Debugging. Requirements and Specification Recall the four steps of problem solving: Orient, Plan, Execute, Test Before you start the implementation.
Programming In C++ Spring Semester 2013 Lecture 2 Programming In C++, Lecture 2.
CS211 Data Structures Sami Rollins Fall 2004.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
1 Chapter Two Introduction to the Programming Language C.
C programming Language and Data Structure For DIT Students.
CH1 – A 1 st Program Using C#. Program Set of instructions which tell a computer what to do. Machine Language Basic language computers use to control.
By: Mr. Baha Hanene Chapter 3. Learning Outcomes We will cover the learning outcome 02 in this chapter i.e. Use basic data-types and input / output in.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Java Programs COMP 102 #3.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
Introduction to Python Dr. Bernard Chen Ph.D. University of Central Arkansas July 9 th 2012
A First Program Using C#
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 2 - Welcome Application: Introduction to C++
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language.
Hello World 2 What does all that mean?.
Gator Engineering 1 Chapter 2 C Fundamentals Copyright © 2008 W. W. Norton & Company. All rights reserved.
CS Tutorial 1 Getting Started with Visual Studio 2012 (Visual Studio 2010 are no longer available on MSDNAA, please choose Visual Studio 2012 which.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 1B Introduction (Tutorial)
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Chapter 3: Completing the Problem- Solving Process and Getting Started with C++ Introduction to Programming with C++ Fourth Edition.
History of C and C++ C++ evolved from C ANSI C C++ “spruces up” C
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.
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
IF-ELSE IF-ELSE STATEMENT SWITCH-CASE STATEMENT Computer Programming Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
Program A computer program (also software, or just a program) is a sequence of instructions written in a sequence to perform a specified task with a computer.
1 計算機程式設計 Introduction to Computer Programming Lecture01: Introduction and Hello World 9/10/2012 Slides modified from Yin Lou, Cornell CS2022: Introduction.
Computer Programming TCP1224 Chapter 3 Completing the Problem-Solving Process and Getting Started with C++
History of C 1950 – FORTRAN (Formula Translator) 1959 – COBOL (Common Business Oriented Language) 1971 – Pascal Between Ada.
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
Python From the book “Think Python”
Lecture 6: Computer Languages. Programming Environments (IDE) COS120 Software Development Using C++ AUBG, COS dept.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Creating Projects in JCreator Computer Science 40S.
COMPUTER PROGRAMMING. A Typical C++ Environment Phases of C++ Programs: 1- Edit 2- Preprocess 3- Compile 4- Link 5- Load 6- Execute Loader Primary Memory.
1 Programming in C Hello World! Soon I will control the world! Soon I will control the world!
Introduction to VB.NET 2005 Dr. McDaniel IDS4704 Spring 2005.
N from what language did C++ originate? n what’s input, output device? n what’s main memory, memory location, memory address? n what’s a program, data?
1 C++ Programming Basics Chapter 1 Lecture CSIS 10A.
© 2004 Pearson Addison-Wesley. All rights reserved ComS 207: Programming I Instructor: Alexander Stoytchev
JAVA Practical Creating our first program 2. Source code file 3. Class file 4. Understanding the different parts of our program 5. Escape characters.
DATA TYPE AND DISPLAY Computer Programming Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Java Programs COMP 102 #3.
Introduction to Eclipse Programming with an Integrated Development Environment.
Introduction to C++.  Computers: CPU, Memory & Input / Output (IO)  Program: Sequence of instructions for the computer.  Operating system: Program.
How to Execute first program in Borland C++. Install Borland C++ Download Borland C++ from LMS – rland%20C++%20V3.1.ziphttp://vulms.vu.edu.pk/Courses/CS609/Downloads/Bo.
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
© Peter Andreae Java Programs COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic.
CHAPTER 3 COMPLETING THE PROBLEM- SOLVING PROCESS AND GETTING STARTED WITH C++ An Introduction to Programming with C++ Fifth Edition.
Introducing Python 3 Introduction to Python. Introduction to Python L1 Introducing Python 3 Learning Objectives Know what Python is and some of the applications.
Debugging using By: Samuel Ashby. What is debugging?  A bug is an error in either a program or the hardware itself.  Debugging is first locating and.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
Introduction To Software Development Environment.
Tutorial 1 Writing Your First C++ Program CSC1110C Introduction to Computer Programming By Paul Pun Acknowledgement: Special thanks to Dr. Michael Fung.
The eclipse IDE IDE = “Integrated Development Environment”
Iteration statement while do-while
Administrative things
Introduction to CS Your First C Programs
សេចក្តីផ្តើមពី Programming
Govt. Polytechnic,Dhangar
Download and Installation of code::blocks
Double click Microsoft Visual Studio 2010 on the Computer Desktop
Introduction to Programming - 1
Iteration Statement for
Administrative things
Presentation transcript:

INTRODUCTION TO C PROGRAMMING LANGUAGE Computer Programming Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat

Technical Term in Software Development  Edit : edit or modify source code  Compile : translate source codes to machine code  Execute or Run : execute a machine code on computer  Debug : Find and eradicate bugs in source codes  Integrated Development Environment (IDE) : A software suite that integrates “edit-compile- execute-debug” program

Software development on C

CodeBlocks IDE  Free IDE for developing software using C/C++ programming language  Site:

New Project  File  New  Project

Choose Project Type  Choose Console Application  Click Go, Then click Next

Select the language  Choose C and click Next

Project Location  Type “project title” name  Choose the location that will store source code files of your project

Choose Compiler  Just click Finish

Default Source Code

Run Menu  Build  Run  Build and Run (F9)

Structure of C programming language

Sample C Source Code Your code

Hello World printf(“message”); C standard function that uses to display message on the monitor

Let’s try  Remove a semicolon(;) from the line “printf(“Hello World”);”

Compile Error Compiler shows you a red icon around the line of your first error. At around the 9 th line of your code syntax error before “return”

Hello World! (again) \n is a special character to tell printf function make a new line

Quiz 1  What is the output of this program ?

Quiz 2  What is the output of this program ?

Comment in your source code  When you write a program, sometimes it is a good way to comment something to make you easy to understand your own code in the following days, months, or years  With comment, the compiler will pass and not compile your comment lines.  In original C programming language  We use /* your comment */  It can take comment on multiple line /* This is my comment */

Example: How to use comment

Comment (2)  Current C compiler has influent of C++ compiler, Thus now they can also take C++ style comment.  // (double slash)  String from // to the end of line will be commented

QUIZ 3  What is the output of this program ?

QUIZ 4  What is the output of this program ?

QUIZ 5  What is the output of this program ?