Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming In C++ Spring Semester 2013 Programming In C++, Lecture 1.

Similar presentations


Presentation on theme: "Programming In C++ Spring Semester 2013 Programming In C++, Lecture 1."— Presentation transcript:

1 Programming In C++ Spring Semester 2013 Programming In C++, Lecture 1

2 What Is Programme? Programming In C++, Lecture 1

3 What Is Language? Programming In C++, Lecture 1

4 Write A Short Programme. Programming In C++, Lecture 1 How you drink water?

5 Programming In C++, Lecture 1 Computer Programming Low Level Programming High Level Programming A programming language is a communicate instructions to a computer. Programming languages can be used to create programs that control the behaviour of a machine and/or to express algorithms precisely. Programming languages fall into two categories:

6 Programming In C++, Lecture 1 Computer Programming Low Level Programming Low-level languages are considered to be closer to computers. Its prime function is to operate, manage and manipulate the computing hardware and components. Low Level Languages are: 1.Machine Languages 2.Assembly Languages

7 Programming In C++, Lecture 1 Computer Programming High Level Programming Higher-level languages allow the programmer to work in a more English-like environment that resembles natural language or mathematical notation also visual environment, using graphical tools. Procedural Programming Object Oriented Programming

8 Programming In C++, Lecture 1 Computer Programming High Level Programming Procedural Languages A computer programming language that executes a set of commands in order is called procedural Language. It is written as a list of instructions, telling the computer, step-by-step, what to do. For Example. 1.Open a file 2.Read a number 3.Multiply by 4 4.Display something. Procedural programming is fine for small projects. It is the most natural way to tell a computer what to do.

9 Programming In C++, Lecture 1 Computer Programming High Level Programming Object Oriented Programming

10 Programming In C++, Lecture 1 Computer Programming High Level Programming Web Development (HTML, PHP, JSP, ASP etc.) Application Development (Java, C, C++,.net etc.) Mobile Application (Objective C, J2ME etc.) Data Base (SQL, SQL Plus)

11 Programming In C++, Lecture 1 Computer Programming Quiz What is your Lecturer’s Name & his qualification? Which Language is close to computer hardware? What is Database language? Which level of programming language is close to human? Which programming language will you cover in this course?

12 Programming In C++, Lecture 1 What Is C Programming Language?

13 Programming In C++, Lecture 1 Introduction To C Programming Language Book “Turbo C Programming for PC and Turbo C++” By Robert Lafore,

14 Programming In C++, Lecture 1 Introduction To C Programming Language n The C programming language was designed by Dennis Ritchie at Bell Laboratories in the early 1970s n Traditionally used for systems programming, though this may be changing in favor of C++ n C Language in between the Low Level Language and High Level Language (Middle Level Language)

15 Programming In C++, Lecture 1 C Mainly Used For n Mainly because it produces code that runs nearly as fast as code written in assembly language. Some examples of the use of C might be: –Operating Systems –Language Compilers –Assemblers –Text Editors –Print Spoolers –Network Drivers –Modern Programs –Data Bases –Language Interpreters –Utilities

16 Programming In C++, Lecture 1 What We Need n PC Hardware n Ms-Dos n Turbo C Development System (Integrated Development System (IDE))

17 Programming In C++, Lecture 1 Turbo C Development System It is a screen display with windows and pull down menus. The program listing, its output, error messages and other information are displayed in separate windows. You can use menu selections to invoke all the operations necessary to develop your program including editing, compiling, debugging, Linking and program execution.

18 Programming In C++, Lecture 1 Basics of C Environment n C systems consist of 3 parts –Environment –Language –C Standard Library n Development environment has 6 phases –Editing: Writing the source code by using some IDE or editor –Pre-processor: Already available routines –Compile: translates or converts source to object code for a specific platform –Link: resolves external references and produces the executable module –Load: load into memory –Execute : Run the program

19 Programming In C++, Lecture 1 Basics of C Environment Compiling Program are in two versions 1.You type which is called the source file. 2.Machine-Language version, which is called executable file The Complier, which is a part of the IDE, translates this source code into another file, consisting of machine language at once. The Interpreter, which is a part of the IDE, translates this source code into another file, consisting of machine language but line by line.

20 Programming In C++, Lecture 1 Basics of C Environment Linking Execute new compiler-generated file to run your program. The Linker combines all the required files into a single executable file.

21 Programming In C++, Lecture 1 Basics of C Environment Errors Syntax Error Logical Error

22 Programming In C++, Lecture 1 Files Used in C Program Development Executable Files Library & Runtime Files Header Files Programmer-Generated Files

23 Programming In C++, Lecture 1 Files Used in C Program Development Executable files are stored in the subdirectory BIN. The most important executable file for the Turbo C Language is the TC.EXE. Executable this program places the IDE on your screen. The BIN directory also contains programs for the command line development process. For example. TCCCommand-line compiler TLINKCommand-line linker TCINSTCustomize Turbo IDE CPPPre-processor Utility TLIBLibrary file manager MAKEFile management program Executable Files

24 Programming In C++, Lecture 1 Files Used in C Program Development Various files are combined with your programs during linking. These files contain routines for a wide variety of purposes. They are stored in LIB subdirectory. Library & Runtime Files

25 Programming In C++, Lecture 1 Files Used in C Program Development Library files are group of precompiled routines for performing specific tasks. A library files has a unique characteristic: only those parts of it that are necessary will be linked to a program, not the whole file. Library Files

26 Programming In C++, Lecture 1 Files Used in C Program Development The subdirectory called INCLUDE contains header files. These files are text files, like the one you generate with a word processor or the Turbo C editor. Header files can be combined with your program before it is complied, in the same way that a programmer can insert a standard heading in a business letter. Each header file has a “.h” file extension Header Files

27 Programming In C++, Lecture 1 Files Used in C Program Development You can place the programs that you write in any subdirectory you choose: for instance a subdirectory under TC. Programmer-Generated Files

28 Programming In C++, Lecture 1 Introduction To C Programming Language What we need to develop C programme? What is difference between Complier & interpreter? What is Linker? What is source file & Executable file? How many type or error could have? What is Header files? What is Library files? Quiz


Download ppt "Programming In C++ Spring Semester 2013 Programming In C++, Lecture 1."

Similar presentations


Ads by Google