1 / 8

CSC 202 Computer Programming

CSC 202 Computer Programming. What is Program ? Program is a set of instruction that a machine follows. What is Programming? Programming is to make machine work. Programming creates instruction set that a machine follows. Program has typically 3 parts: Input Process Output

chinue
Download Presentation

CSC 202 Computer Programming

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. CSC 202 Computer Programming What is Program ? Program is a set of instruction that a machine follows. What is Programming? Programming is to make machine work. Programming creates instruction set that a machine follows.

  2. Program has typically 3 parts: Input Process Output Example: Summation Program takes two numbers as input and displays their sum. CSC 202 Computer Programming Anatomy of a Program Input: 2 , 3 Process: sum= 2+3 Output : Display sum:5

  3. CSC 202 Computer Programming What is Software then???? • There is no hard and fast distinction between program and software. • Software is often called Program and vice versa • When it is said Software, then the program is always complete and ready to be used. Softwares are of two kinds 1. Application Software 2. Operating system

  4. Application softwares MS Word MS Excel Winamp Herosoft Windows Media player Calculator PowerDVD Calculator Operating System(OS) Windows XP Windows 98 Linux Unix Solaris MacOS Windows Vista

  5. Popular Desktop Programming languages: C Java C++/ Visual C++ C# Visual Basic Popular Web Programming languages: HTML PHP XML ASP ASP.NET CSC 202 Computer Programming Programming LanguageProgramming languages are used to write programs.Some of these languages are quite similar to human language.Programs are of two kinds: Desktop application and Web application. As an example we can say MS Word is desktop application whereas Yahoo mail is a web application.

  6. C was invented in 1970 by Dennis Ritchie at Bell Lab. C’s popularity became widespread in 1980s. Father of other modern languages Why do we choose C? C is easier to learn C program runs on almost all the Operating Systems C program takes less time to run. C programmer can easily switch to any language. CSC 202 Computer Programming Introduction to C

  7. Introduction to Turbo C compiler with a sample C program: adder.cpp #include<stdio.h> #include<conio.h> void main(){ int a, b, sum; a=2; b=3; sum=a+b; printf(“Result:\n”); printf(“Sum is %d \n”,sum); getch(); }

  8. As books are kept into different shelves in the library, instructions are also organized into different functions. A function is a block instructions A program contains one or more functions Each program has a function named “main” and a program starts execution from main function. Note: For the time being, all our programs will have only one function that is main. CSC 202 Computer Programming Functions Program Function 1 Instruction 1 Instruction 2 Instruction 3 Instruction 4 Instruction 5 Instruction 6 Function 2 Instruction 7 Instruction 8

More Related