1 / 28

Programming In C++

Programming In C++. Spring Semester 2013. What Is Programme?. What Is Language?. Write A Short Programme. How you drink water?. Computer Programming. A  programming language  is a communicate instructions to a  computer .

tacy
Download Presentation

Programming In C++

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. How you drink water? Programming In C++, Lecture 1

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

  6. 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: • Machine Languages • Assembly Languages Programming In C++, Lecture 1

  7. 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 Programming In C++, Lecture 1

  8. 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. • Open a file • Read a number • Multiply by 4 • Display something. • Procedural programming is fine for small projects. It is the most natural way to tell a computer what to do. Programming In C++, Lecture 1

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

  10. 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) Programming In C++, Lecture 1

  11. 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? Programming In C++, Lecture 1

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

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

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

  15. C Mainly Used For • 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 Programming In C++, Lecture 1

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

  17. 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. Programming In C++, Lecture 1

  18. Basics of C Environment • C systems consist of 3 parts • Environment • Language • C Standard Library • 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 Programming In C++, Lecture 1

  19. Basics of C Environment • Compiling • Program are in two versions • You type which is called the source file. • 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. Programming In C++, Lecture 1

  20. 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. Programming In C++, Lecture 1

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

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

  23. Files Used in C Program Development Executable Files • 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. • TCC Command-line compiler • TLINK Command-line linker • TCINST Customize Turbo IDE • CPP Pre-processor Utility • TLIB Library file manager • MAKE File management program Programming In C++, Lecture 1

  24. Files Used in C Program Development Library & Runtime Files • 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. Programming In C++, Lecture 1

  25. Files Used in C Program Development Library Files • 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. Programming In C++, Lecture 1

  26. Files Used in C Program Development Header Files • 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 Programming In C++, Lecture 1

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

  28. Introduction To C Programming Language Quiz • 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? Programming In C++, Lecture 1

More Related