Download presentation
Presentation is loading. Please wait.
Published byChristian Higgins Modified over 9 years ago
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
Anatomy of a Program Program has typically 3 parts: Input Process Output Example: Summation Program takes two numbers as input and displays their sum. CSC 202 Computer Programming Input: 2, 3 Process: sum= 2+3 Output : Display sum:5
3
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 CSC 202 Computer Programming
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
Programming Language Programming languages are used to write programs. Some of these languages are quite similar to human language. Pr ograms 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. Popular Desktop Programming languages: CC Java C++/ Visual C++ C# Visual Basic Popular Web Programming languages : HTML PHP XML ASP ASP.NET CSC 202 Computer Programming
6
Introduction to C 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
7
Introduction to Turbo C compiler with a sample C program: adder.cpp #include void main(){ int a, b, sum; a=2; b=3; sum=a+b; printf(“Result:\n”); printf(“Sum is %d \n”,sum); getch(); }
8
Functions 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. Program Instruction 1 Instruction 2 Instruction 3 Instruction 4 Instruction 5 Instruction 7 Instruction 8 Instruction 6 Function 1 Function 2 CSC 202 Computer Programming
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.