Download presentation
Presentation is loading. Please wait.
1
Programming Languages
2
Introduction The computer programming involves designing the computer programs to solve different kinds of problems as well as to control different operations of the computer A computer is nothing without a computer program A computer program is designed after understanding the problem To develop a correct program, the programmer must write program instructions in the proper sequence
3
Example To find out the average marks of the student
Get the marks of all subjects of the student Calculate the total marks Calculate the average marks Print the average marks
4
Algorithm The step-by-step procedure for the solution of the problem is called algorithm The algorithm represent the sequence of steps or instructions and the order in which these steps are taken for the solution of the problem An algorithm provides the procedure for the solution of the problem in general terms only An algorithm is written before writing the actual computer program It is written by using short English statements
5
Example Program to find average and sum of three numbers
INPUT “Enter the first number: ” ; X INPUT “Enter the second number: ” ; Y INPUT “Enter the third number: ” ; Z LET SUM = X + Y + Z AVG = SUM/3 PRINT “Sum of three numbers is: ” ; SUM PRINT “Average of three numbers is: ” ; AVG END
6
Altering Order of Algorithm
Algorithm operations are ordered in that there is first instruction, a second instruction etc An algorithm must have the ability to alter the order of its instructions An instruction that alters the order of an algorithm is called a control structure
7
Types of Control Structures
Sequential Structure Conditional Structure Iterative Structure
8
Example
9
Pseudo code Pseudo code is a problem solving tool
It is a generic way of describing an algorithm without use of any specific programming language syntax Statements in pseudo code represent the logic of actual computer program in natural language Cannot be compiled nor executed Also called program design language
10
Example If student’s marks is greater than or equal to 50% Else
Print “Passed” Else Print “Failed”
11
Flow Chart Graphical or symbolic representation of the solution of a problem Graphical representation of algorithm or pseudo code Used to describe the solution of the problem Easy to understand Plan to be followed for coding a program Errors in the logic of the program can be detected very easily in flowchart
12
Symbols of Flow Chart Each step in solving the problem is represented by a different symbol Each symbol also contains a short description about the step The flow chart symbols are linked together with arrows that show the direction of flow of data or control
13
Operating System Functions
14
Example
15
Example
16
Example
17
Programming Languages
A language is defined as a way of communication between two persons Programming language is a means of communication between computer and the user A computer program is written or prepared in programming language Each programming language has a set of alphabets and rules for writing computer programs
18
Types of Programming Languages
Low Level Language Machine Language Assembly Language High Level Language FORTRAN COBOL C++
19
Types of High Level Language
Procedural language Non-Procedural language Object Oriented Programming languages
20
Advantages of High Level Languages
Easy to learn Easy to understand Easy to write program Easy to detect and remove errors Built in library functions Machine independence
21
Difference between Low Level & High Level Languages
Low Level Languages is close to machine language, while High level languages is close to human language Low Level Languages is machine dependent, while High level languages is machine independent
22
Programming Techniques
Structured Programming Object Oriented Programming Event Driven Programming Visual Programming
23
Language Processors A computer understands instructions in machine code A program written in any high level programming language is called the source program The source code cannot be executed directly by the computer The source program must be converted into machine code before running it on the computer “The special translator system software that is used to translate the program written in high level language(or assembly language) into machine code is called language translator or language processor”
24
Types of Language Processors
Compiler Interpreter Assembler
25
Difference between Compiler & Interpreter
Compiler translates the source code into object code as a whole, while interpreter translates the source code into machine code statement by statement Compiler creates an object file while interpreter does not create object file
26
References Introduction to Information Technology by Riaz Shahid, CM Aslam and Safia Iftikhar The Concepts of Information Technology by Imran Saeed, Ahsan Raza, Tariq Mehmood and Zafar Hussain
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.