Hello World C By Anand George.

Slides:



Advertisements
Similar presentations
Programming Basic Concepts © Juhani Välimäki 2003.
Advertisements

Lecture 1: Overview of Computers & Programming
Creating a Program In today’s lesson we will look at: what programming is different types of programs how we create a program installing an IDE to get.
Lecture 1: Intro to Computers Yoni Fridman 6/28/01 6/28/01.
B-1 Lecture 2: Problems, Algorithms, and Programs © 2000 UW CSE University of Washington Computer Programming I.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Computer Literacy PowerPoint Dustin Llanes Comm. 165.
Chapter 3 Software Two major types of software
Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:
Types of software. Sonam Dema..
Programming a computer. What does programming a computer mean ? Programming a computer: Since a computer can only execute machine instructions (encoded.
Introduction to Java Tonga Institute of Higher Education.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
Introduction COMP104: Fundamentals and Methodology.
Computer Systems Week 10: File Organisation Alma Whitfield.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
Programming With C.
History of C 1950 – FORTRAN (Formula Translator) 1959 – COBOL (Common Business Oriented Language) 1971 – Pascal Between Ada.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
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?
DOCUMENTATION SECTION GLOBAL DECLARATION SECTION
A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Chapter 1 slides1 What is C? A high-level language that is extremely useful for engineering computations. A computer language that has endured for almost.
3/5/2002e-business and Information Systems1 Introduction Computer System Hardware Software HW Kernel/OS API Application Programs SW.
Software Development Environment
Topic 2: Hardware and Software
Why don’t programmers have to program in machine code?
Topic: Programming Languages and their Evolution + Intro to Scratch
Computer Terms Review from what language did C++ originate?
Tools of the Trade
Computer Organization, Eclipse Intro
CSCI-235 Micro-Computer Applications
Introduction to C Language
Chapter 2 - Introduction to C Programming
Computer Programming Chapter 1: Introduction
Instructor: Chien-Ho Ko
Introduction to C Language
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
History of ‘C’ Root of the morden language is ALGOL It’s first
Getting Started with C.
Chapter 2 - Introduction to C Programming
Choice of Programming Language
CMPE 152: Compiler Design ANTLR 4 and C++
Programming COMP104: Fundamentals and Methodology Introduction.
Welcome In The World Of ‘C’.  TEXT BOOK: Programming in ANSI ‘C By: E Balagurusamy. TMH  Reference Books: 1) The ‘C Programming Language By: Kernighan.
Assembler, Compiler, Interpreter
Lecturer: Mukhtar Mohamed Ali “Hakaale”
Functions Inputs Output
Chapter 2 - Introduction to C Programming
Chapter 2 - Introduction to C Programming
Lecture Topics: 11/1 General Operating System Concepts Processes
CSCE 313 – Introduction to UNIx process
Chapter 2 - Introduction to C Programming
Assembler, Compiler, Interpreter
Introduction to Computer Programming
Java Programming Introduction
Tonga Institute of Higher Education IT 141: Information Systems
Chapter 2 - Introduction to C Programming
Tonga Institute of Higher Education IT 141: Information Systems
Computer Terms Review from what language did C++ originate?
Troubleshooting Compiler Errors
Software Lesson 3.
System Programming By Prof.Naveed Zishan.
ICS103 Programming in C 1: Overview of Computers And Programming
Week 5 Computers are like Old Testament gods; lots of rules and no mercy. Joseph Campbell.
Hello World Program In Visual Studio and Debugging
Presentation transcript:

Hello World C By Anand George

Why learning C in the year 2012 or later? Don’t underestimate C. 100% windows Kernel is written in C including Windows 8. ( bit assembly as well) C is a must to learn C++ in fact C++ is just a super set of C. 100% Linux kernel is either C or C++. What browser/software you are using to view this? IE?, Firefox?, chrome? PowerPoint? Adobe reader? Media player ? You name it ..all are written in either C/C++.

Then why so much hype about C# ..Java..etc? These languages are simpler and relative easy to develop business logic. To many libraries / software are available which promotes them in web and other business scenarios. For example if you develop a web application you will never go with C/C++ but you will do with something like java/C#/php.

Then why cant I go with Java or C# any way I am new to all? Those languages abstract so many things so that you wont understand the basics. It like start learning counting from the number 10000. some time you wont even understand if some one tell about 2 or 3 which is less than 10000. They will place the programmer in virtual world which is far from reality. In those languages more “doing” is happening than leaning. If you want to be a real engineer who like to know the fundamentals you will start from C and Assembly language which we are going do here.

Demo Hello world program in C using visual Studio. scanf to take input from user of the program. %d, %c, %s, %x

What just happened? Big thing ( and very complicated in fact ) Wrote a program in C with the help of Visual Studio. Complied that program with help of complier integrated to visual studio. The complier created the CPU instruction for the program we just wrote. The OS ( windows ) loaded the above generated instructions made the CPU of the computer execute those instructions and we saw the output. ( we ignore details like linking etc for now )

Steps Program in Visual studio given to complier Compiler created the equivalent CPU instruction of the program we have given. Visual Studio started the program which is the output of the complier. OS loaded the program and given the CPU instructions to CPU to execute. CPU executed the instruction and we saw the Output.

The main function Where the execution begins. “{“ opening and “}” closing of a function definition. printf is a function. “hello world” is the argument to the function.

#include <stdio.h> We are including something called header file. This is to make complier happy for we are using printf function. Stdio.h is called header file which a text file.

Bit about libraries and functions Program is instruction to computer. In a program we cannot do everything by ourselves, just like in life we cannot do everything for example for a Car we buy a car ( and never make a car ) which is made by car company who is expert in making car. Like that many things book, computer, pen, pencil so many “things” we “buy” Like that in program we ‘call’ ( “buy” ) functions ( “things” )which is made by experts like printf we saw. But as you know some thing we do make like food, drinks so do in programming we write some functions as well which is specific to our program and fairly easy to make.

Library Header files sometime called a Library. Which contains functions which can be called in our program. stdio.h in our case contains printf which we are calling in our program.

What exactly is our program? Just a text file with .cpp extension. Can be opened in notepad as well.

Demo : Where are the other actors? Looking at project files. And output files Demo. Executing application outside visual studio.

Demo How look for functions and their reference? scanf and printf Msdn and other web sites.

Thank you.