You are on page 1of 102

INTRODUCTION

BY AMIT PATEL
Unit 1

 1.1 Concepts of Programming Language


 1.1.1 Introduction of Source Code, Object Code and executable code
 1.1.2 Algorithm and Flowchart
 1.1.3 Concepts of Structured Programming Language

 1.2 Concepts of Editor, Interpreter and Compiler


 1.2.1 Introduction of C program body structure
 1.2.2 Character Set, concepts of variables and constants
 1.2.3 Identifiers, literals, Key words
 1.2.4 Data types

What is Program?

 Detailed plan or procedure for solving a problem with a computer.

OR

 Instructions that tell a computer what to do.

OR

 A set of instructions that directs a computer's hardware to perform a task is called a program, or
software program.

 An unambiguous, ordered sequence of computational instructions necessary to achieve such a


solution
What is Programming Language?

 Languages that programmers use to write program are called “Programming languages."

OR

 Set of commands, instructions, and other syntax use to create a software program

 There are 2 type of Language.


1. High Level Language
2. Low level Language
What is Programming Language?

 High level programming language: Programmers to write instructions in a language that is


easier to understand by users .

 It is concentrate on logic to solve the problem.

 Programming language like C, C++, Java is known as High level programming lanaguage .

 In simply, all this language write programming statement in English which is human
understand. And those language understand by user is known “High level programming
language”
What is Programming Language?

 Low-level language: Recognized directly by the computer hardware.

 It is very close to machine.

 Machine cannot understand human language.

 It understand language of “0” and “1” (Binary language)

 Example: Machine code and Assembly language


INTRODUCTION

 Python is a general purpose, dynamic, high-level, and interpreted programming language.

 It supports Object Oriented programming approach to develop applications.

 It is simple and easy to learn and provides lots of high-level data structures.

 Python's syntax and dynamic typing with its interpreted nature make it an ideal language for
scripting and rapid application development.
Parameter High Level Language Low Level Language

Hardware knowledge Not required Required

Ease of Learning Easy to understand and learn Hard to understand and learn

Performance Slow Fast

Example C, C++, Java, BASIC Machine and Assembly language

Translation Required Not Required

Execution Slow Fast

Modification Easy Hard

Memory Usage More Less

Near to Human language Machine

Used to Write application program Write hardware program

Compilation Require Not require


What is source code?

 Programming statements that are created by a programmer with a text editor

 In C Programming language, we use “Turbo C” editor to create source code.

 Source code = Program.

 “.C” is extension of “C” program source code.

 It cannot be compiled.

 It is in human readable, written in “high level language”


What is object code?

 Object code is the language that a central processing unit can understand.

 It can be run on any computer with same CPU architecture.

 It has been translated by the compiler from the programming source code.

 Once source code is compiled by compiler, it is translated into object code.

 Extension : “.obj”

 Not understand by human, written in “Low level language”


What is executable code?

 Executable is the output of a linker after it processes the object code.

 Also called the Binary.

 Extension: .exe

 Executable Code means a form of computer program or portion which can be executed by
a computer without further translation or modification.

 It can be executed directly by CPU.


Executable code Vs Object Code

Object Code Executable Code

A sequence of statements in binary that is The output of a linker after it processes the
generated after compiling the source object code
program.

Cannot run directly by the CPU. Executable code can be run directly by CPU

Extension: .obj Extension: .exe


“C” Program execution background story.

 There are basically three steps involved in converting your ideas into what is to be done to
make it a working program. There are three steps involved in converting your idea of what
is to be done to a working program.
1. Creating a source code.

2. Compile the source code and produce an object file.


3. Linking all the object files and libraries to produce an executable code.
Algorithm

 Before starting any work , we have to plan or design how to complete it.

 Definition: An algorithm is a set of well-defined instructions to solve a particular problem.

 It is a step by step instruction to solve the problem.

 It takes a set of input and produces a desired output.

 Based on algorithm it is easy for programmer to write programming statements.

NOTE:

 In computer programming, before solving any program , we have to write algorithm.


An algorithm to add two numbers:

 Take two number inputs


 Add numbers using the + operator
 Display the result
Characteristics of Algorithm
Algorithm Characteristics

 Clear and Unambiguous: Algorithm should be clear and unambiguous. Each of its steps
should be clear in all aspects and must lead to only one meaning.

 Well-Defined Inputs: If an algorithm says to take inputs, it should be well-defined inputs.

 Well-Defined Outputs: The algorithm must clearly define what output will be yielded and it
should be well-defined as well.

 Finiteness: The algorithm must be finite, i.e. it should not end up in an infinite loops or
similar.
Algorithm Characteristics

 Feasible: The algorithm must be simple, generic and practical, such that it can be executed
upon will the available resources. It must not contain some future technology, or anything.

 Language Independent: The Algorithm designed must be language-independent, i.e. it must


be just plain instructions that can be implemented in any language, and yet the output will
be same, as expected.
Algorithm : Advantages

 It is a step-wise representation of a solution to a given problem, which makes it easy to


understand.
 An algorithm uses a definite procedure.
 It is not dependent on any programming language, so it is easy to understand for anyone
even without programming knowledge.
 Every step in an algorithm has its own logical sequence so it is easy to debug.
 By using algorithm, the problem is broken down into smaller pieces or steps hence, it is
easier for programmer to convert it into an actual program.
Algorithm : Disadvantages

 Algorithms is Time consuming.


 Difficult to show Branching and Looping in Algorithms.
 Big tasks are difficult to put in Algorithms.
Write an Algorithm to print your name.

 Step 1 : START
 Step 2 : Take an element X
 Step 3 : Store your name in X
 Step 4 : Print / Display X
 Step 5 : STOP
Write an Algorithm to print addition of two numbers.

 Step 1 : START
 Step 2 : Declare a=10 and Declare b=10
 Step 3 : Calculate c = a+b
 Step 4 : Display c
 Step 5 : STOP
Write an Algorithm to print cube of number.

 Step 1 : START
 Step 2 : Declare a=10 OR read value of a.
 Step 3 : Calculate c = a*a*a
 Step 4 : Display c
 Step 5 : STOP
Write an algorithm to print 12th marksheet

 Step 1 : START
 Step 2 : Declare name=“VTCBB” and seatnum=“20BCA151”
 Step 3 : Declare cs=90,maths=99,ic=90,cppm=36,dma=90
 Step 4 : Display name, Seatnum
 Step 5 : Display cs,maths,ic,cppm,dma
 Step 6 : Calculate t=cs+maths+ic+cppm+dma
 Step 7 : Calculate per=t/5 or t*100/500
 Step 8 : Display t and per.
 Step 9 : Stop
Write an algorithm to print 12th marksheet

 Step 1 : START
 Step 2 : Declare variable name, seatnum, cs, maths, ic, cppm, dma
 Step 3 : Read all variable value.
 Step 4 : Display name, Seatnum
 Step 5 : Display cs,maths,ic,cppm,dma
 Step 6 : Calculate t=cs+maths+ic+cppm+dma
 Step 7 : Calculate per=t/5 or t*100/500
 Step 8 : Display t and per.
 Step 9 : Stop
Flowchart

 Definition: A flowchart is a type of diagram that represents an algorithm.

 Flowcharts normally use standard symbols to represent the different types of instructions.

 These symbols are used to construct the flowchart and show the step-by-step solution to
the problem.
Flowchart : Advantages

 Communication : Flowchart are better way of communicating the logic of the system
 Effective analysis: With the help of flowchart, a problem can be analyzed in a more effective way.
 Efficient Coding: The flowchart act as a guide or blue print during the system analysis and
program development phase.
 Proper debugging : The flowchart helps in debugging process. Debugging means finding and
correcting problems or mistakes or errors.
 Proper documentation: A flowchart serves as a good program documentation which is needed
for future purpose.
 Efficient program maintenance: Using the flowchart, we can easily manage the program or a
system.
Flowchart : Disadvantages

 It is difficult to draw flowchart for large and complex programs.

 In this their is no standard to determine the amount of detail.

 Difficult to reproduce the flowcharts.

 It is very difficult to modify the Flowchart.


Draw a flowchart to make a tea

START

TAKE A BOWL

ADD WATER AND MILK

STOP
Draw a flowchart to print a square of number

START

DECLARE A=10

CALCULATE
C=A*A

DISPLAY C

STOP
WRITE AN ALGORITHM, FLOWCHART, SAMPLE CALCULATION TO FIND MINIMUM OF TWO
NUMBERS

 STEP 1 : START
 STEP 2 : DISPLAY “ENTER VALUE OF A”
 STEP 3 : READ A
 STEP 4 : DISPLAY “ENTER VALUE OF B”
 STEP 5 : READ B
 STEP 6 : IF A<B THEN GO TO STEP 7 ELSE GO TO STEP 8
 STEP 7 : DISPLAY “A IS MINIMUM”
 STEP 8 : DISPLAY “B IS MINIMUM”
 STEP 9 : STOP
WRITE AN ALGORITHM, FLOWCHART, SAMPLE CALCULATION TO FIND MINIMUM OF TWO
NUMBERS

DISPLAY READ A DISPLAY READ B IS A< B ? DISPLAY “A DISPLAY “B


“ENTER “ENTER IS MINIMUM” IS MINIMUM”
VALUE OF A” VALUE OF B”

ENTER A=10 ENTER B=20 IS 10<20? A IS --------


VALUE OF A VALUE OF B TRUE MINIMUM

ENTER A=20 ENTER B=15 IS --------- B IS


VALUE OF A VALUE OF B 20<15? MINIMUM
FALSE
WRITE AN ALGORITHM, FLOWCHART, SAMPLE CALCULATION TO FIND MINIMUM OF TWO
NUMBERS

START

DISPLAY “ENTER
VALUE OF A: “

READ A

DISPLAY “ENTER
VALUE OF B : “

READ B

A
A

TRUE / FALSE /
IS A<B?
YES NO

DISPLAY “A IS DISPLAY “B IS
MINIMUM” MINIMUM”

STOP
Concept of Structure Programming Language

 Programming approach in which the program is made as a single structure.

 It means that the code will execute the instruction by instruction one after the other.

 It doesn’t support the possibility of jumping from one instruction to some other with the help of
any statement like GOTO, etc. Therefore, the instructions in this approach will be executed in a
serial and structured manner.

 The languages that support Structured programming approach are:


 C, C++, Java, C#
Introduction of ‘C’ Programming Language

 Create by “Dennish Ritchie” in around 1970.

 Create at Bell Laboratories

 Developed to overcome the problems of previous languages such as B,


BCPL, etc. Initially, C language was developed to be used in UNIX
operating system.

 Used to : Develop system applications that forms major portion of operating


systems such as Windows, UNIX and Linux. Operating systems, C
compiler and all UNIX application programs are written in C language.
Why C is Structure Programming Language?

 C is called a structured programming language because to solve a large problem, C


programming language divides the problem into smaller structural blocks each of which handles
a particular responsibility.

 These structural blocks are


 Decision making blocks like if-else,if-elseif-else, switch-cases.
 Repetitive blocks like For-loop, While-loop, Do-while loop etc
 subroutines/procedures - functions
C Program Body Structure

 Whenever we create a program in C language, we can divide that program


into six different sections.

 In C language, all these six sections together make up the Basic Structure
of C Program.

 This section is as follows:


Documentation Section

Link Section

Definition Section

Global Declaration Section

main()

Declaration Section

Executable part

Subprogram section

Function 1

Function 2

.Function n
Continue…

 The Documentation Section consists of a set of comment lines giving the name of the program
and other details. The compiler ignores the comments and does not print them on the screen.

 The Link Section: We declare all the Header Files that are used in our program. From the link
section, we instruct the compiler to link those header files from the system libraries, which we
have declared in the link section in our program.

 The Definition Section defines all symbolic constants. Like #define PI 3.14
Continue…

 The Global Declaration Section: Within the Global Declarations Section section, we declare
such variables which we can use anywhere in our program, and that variable is called Global
Variables, we can use these variables in any function.

 main() function: Every C program must have one main function section. Whenever we create a
program in C language, there is one main() function in that program. The main () function starts
with curly brackets and also ends with curly brackets. In the main () function, we write our
statements.This section contains two parts, declaration and executable part.
Continue…

Declaration Part declares all the variables used in the executable part.

 There should be at least one statement in the executable part which contains instructions to
perform certain task.
/* Date -: 27/12/2020
Description -: A Program to find Area of Circle In C Language */
#include<stdio.h> // Link Section
#define PI 3.14 // Definition Section
float r; // Global Declarations Section
int main(void) // Main functions Section
{
float aoc; // Declaration Part
printf("Enter the radius of circle"); // Execution Part
scanf("%f",&r);
aoc=PI*r*r;
printf("area of circle is %f",aoc);
return (0);
}
Token

 Smallest individual element in C.

 For example, we cannot create a sentence without using words; similarly, we cannot
create a program in C without using tokens in C.

 Therefore, we can say that tokens in C is the building block or the basic component for
creating a program in C language.
Comment

 Those statement which are not executable.

 Ignore by compiler.

 Used : To provide information about lines of code and for documenting code.

 There are 2 types of comments in the C language.


 Single Line Comments ( // )
 Multi-Line Comments (/* …… */)

Check :Nested comment is allow or not in c.


Token
Keyword

auto double int struct


 A keyword is a reserved word.
break else long switch
 You cannot use it as a variable name, constant
case enum register  typedef
name, etc.
char extern return union
 There are only 32 reserved words (keywords) continue for signed void
in the C language.
do if static  while
 For example: void, int, char , float default goto sizeof volatile

const float short unsigned


Identifier

 Identifiers refers to name of constants, variables, functions, structures.

 Rules:
 First character must be alphabets or underscore.
 Must be consists letters, digits and underscore.
 Only 31 characters are significant.
 Cannot use keyword.
 Must not contain white space.
Identifier

 Example:

 stud
 tot
 stud_name
 per
String

 Strings are set of characters which can be alphabets, digits or


special characters.

Example:

 “VNSGU”

 “FYBCA- THE Great Class”

 “vnsgu.ac.in”
Special Symbol

 ‘C’ is having large number of Special symbols or special characters.

 Example: $,#,@,!,^,& etc…


Operator

 An operators are symbols that tells the compiler to perform specific


mathematical or logical functions.

 C language is rich in built-in operators.


 Arithmetic Operators
 Relational Operators
 Logical Operators…..etc
Constant

void main()
 Constants are those whose values {
will not change during program const int a=10;
executions. const float pi=3.14;
clrscr();
 Also known as literals.
a=20;
 To declare constant ‘const’ pi=31.4;

keyword will be used. printf("%d",a);


printf("%f",pi);
getch();
}
Constant

 There are following type of constant


 Integer Constant.
 Floating Point Constant.
 Character Constant.
 String Constant.
Constant

 There are following type of constant


 Integer Constant.
 Floating Point Constant.
 Character Constant.
 String Constant.
Integer Constant

 An integer constants consists of sequence of Integer numbers from 0 to 9.

 Decimal points, black spaces, commas cannot be included within an integer constants.

 An Integer constants can either be positive or negative or zero.

 The number without sign can be assumed as positive

 Integer constants can be classified into 3 category . They are


 Decimal Integer Constants.
 Octal Integer Constants.
 Hexadecimal Integer Constants
Integer Constant: Decimal Integer Constant

Invalid Decimal Integer Contant


 A Decimal integer constants consist of any
combination of digits from 0 to 9.
45,565 invalid character (,)
 A Decimal integer constants can contain two or 25.0 invalid character(.)
more digits, but first digit should not be 0. 123 invalid character(blank space)
051 first digit cannot be a zero
 Base value of decimal integer is 10.

 Valid Decimal integer Constants : 0, 12,85,456


Integer Constant: Octal Integer Constant

Invalid Decimal Octal Contant


 Starts with 0 in order to identify the constant.

 Consist: any combination of numbers between 0 to 7. 4725 does not starts with 0
01491 invalid digit(9)
 Base value : 8.
012.23 invalid character(.)
 Valid Octal integer Constants : 0, 012,075,0456 051-43 invalid character(-)
Integer Constant: Hexadecimal Integer Constant

Invalid Decimal Octal Contant


 Start with: 0x or 0X in order to identify the constant

 Consist: any combination of numbers between 0 to 9 and 4725 does not starts with 0x
a to f or A to F. Here A to F denotes 0 to 15. 0x1H91 invalid charcter(H)
0x12.23 invalid character(.)
 Base value : 16.
0x51-43 invalid character(-)
 Valid Octal integer Constants : 0x, 0x12,0x8A6,
0x4a84b4
Floating Point Constant

 Consist : nteger part, decimal point and fractional part.

 Contains: exponential field e or E followed by an integer.

 A normal decimal point value will be treated as double until a suffix f is added to the decimal point
value.

 Decimal point value using double will be more accurate than float.

 Adding suffix l or L to the Decimal point value will be treated as long double.

 Valid : 45.28,28.7,0.4

 Invalid: 47,05
Floating Point Constant

 A floating point constant with an exponent is essentially the same as scientific notation, except that
base 10 is replaced by e or E.

 Exponential notation is useful in representing the numbers whose magnitudes are very large or very
small.

 Floating-point numbers have a sign, mantissa (M), base (B), and exponent (E)


Floating Point Constant

What is Mantissa and Exponent?

 The sequence of digits after decimal point is a mantissa.

 Consider the number 257.47. This can also be return as 0.25747E3.

 Here Mantissa: 2574 and The power of E (3) is known as exponent.

 For example: 4.1 × 103 is the decimal scientific notation for 4100.

 It has a mantissa of 4.1, a base of 10, and an exponent of 3. 


Character Constant

 A character constant is a single character enclosed within single quotes ’ ‘

 Character constant also represented with a single digit or a single special character or white space
enclosed within a single quotes.

 All PC make use of ASCII(American Standard Code for Information Interchange) character set,
where each integer character is numerically encoded.

 A character constant occupies a single byte.

 Valid : ‘a’, ‘1’

 Invalid: ’12’, ‘ab’


String Constant

 A string constant is a sequence of characters enclosed within double quotes " ".

 The Characters may consists of letters, digits, escape sequences and spaces.

 A string constant always ends with null (/0).

 A string constant occupies a two bytes.

 Valid : “ab”, “Om sai ram”

 Invalid: “ab’ , ‘ Om sai”


NOTE

 String constant enclosed with “ “ like “ab”.

 Character constant always enclosed with ‘ ‘ like ‘a’.


Variable

 Variable are those value which can change during programming execution.

 It is a logical name given to the space in memory which contain some changeable value.

 Variable is an identifier for a memory location for storing data.

 Once data is stored with a variable name, it can be retrieved by its variable name for various
computations in a C program.

 Variable can be numerical quantity or character constant.


Variable

Purpose :

 Different operations can be performed using data stored in variables during program execution
Such operetions are Addition, Subtraction, Multiplication etc

 A data can be accessed later in the program by simply referring the name of the variable.

Syntax: <data type> <variable name>

Where as “data type” is the type of value store in “variable name”

Example : int a;

 Here we store integer value in variable a.


Rules to Declare Variable

 Variable name should not be a C keyword.

 Variable must be declared before it can be used.

 Variable name should not be starts with a digit.

 Variable name may be a combination of UPPERCASE and lowercase. e.g.) firstName

 Variable name cannot be repeated within the same scope.


#include <stdio.h>
int main()
{
int number = 25;
int Number = 47;
printf("The number is %d ",number);
printf("\nThe Number is %d ",Number);
return 0;
OUTPUT:
}

The number is 25
The Number is 47
Data type

 It define which type of data will be store in variable.


 Data types simply refers to the type and size of data associated with variables.

 The C language has a rich set of data types to handle different kind of data entered by
programmer.

 Basically a data type informs compiler about how much memory a declared variable
required to store input.

 Data types are used extensively for declaring variables and functions of different types.
Character Type

 A single character in C is of “char” type data.

 Characters stored in 8 bits or 1 byte of memory and the character can also be signed and
unsigned.

 %c format specifier is used to read character value.

 It takes value from 0 to 127

 Example:

char ch=’a’;
printf(“size of character %lu”,sizeof(ch))
NOTE : Character Type

 Signed and unsigned char both used to store single character as per their ASCII values.

 For example, ‘A’ will be stored as 65. we don’t need to specify keyword ‘signed’ for using signed
char.

 Following Both are same

signed char name = ‘a’;

char name = ‘a’;


NOTE : Character Type

 But keyword ‘unsigned’ for using unsigned char must be used.

unsigned char name = ‘a’;

 ASCII table contains 128 character values from 0 to 127 and the remaining 127 characters is
known as extended ASCII character set.

 In signed character extended set takes value from -128 to -1 whereas in unsigned char it takes
value from 128 to 255.

 And when you try to give value 128 to signed char, it will take -128 value like clockwise.
Integer Type

 As the name suggests used to hold only integer values.

 In 32 bit machine, it occupies 2B and range limited from -32768 to 32767.

 In 64 bit machine, it occupies 4B and range from  -2,147,483,648 to 2,147,483,647

 %d format specifier is used to read integer type.

 Any operations involving a number out of this range will return either garbage or an error.
Integer Type

Unsigned int

 An integer could also be of an unsigned type.

 Such a type (unsigned int) on 32-bit will have a range from 0 to 4,294,967,295 and 0 to


65535 on a 16-bit system.

Long

 It also stores the integer data with a higher range.

 The long type is 4 bytes on 32-bit systems and of 8 bytes in 64-bit setups.

 The 32-bit long range is same as an integer.


Integer Type

Unsigned long

 In some case, we require only positive numeric values; then it’s better to use the unsigned type.

 It not only makes sure that you get one but also enhances the range.

 The unsigned long is of 4 bytes and ranges from 0 to 4,294,967,295.


Float Type

 This datatype is also numeric but allows numbers with decimal places.

 It has a size of 4 bytes and has a range of 3.4E-38 to 3.4E+38.

 %f format specifier is used to read float value.

 The float type has a precision up to 6 digits.


Double Type

 It is same as float but with a higher precision range.

 It gives it an ability to store more numerals after the decimal places, double to be exact.

 %lf format specifier is used to read this type of value.

 It has a length of 8 bytes and has a range of 1.7E +/- 308.

 The double data type has a precision up to 16 digits.


void Type

 void type means no value.


 This is usually used to specify the type of functions which returns nothing.
 For example:

void main();
Every function return one or no value.
Here main function return no any value so we define “void” as return value.
NOTE:

Based on diagram char data type require


less storage space
whereas long double require more
data space.
Data Overflow

 Assigning a value which is more than its upper limit is called overflow.

 For example When we try to store float value into integer type variable overflow should be
happen. Because integer variable occupy 2 B and we try to store 4B float data into it.

 In such situation it gives improper output.

 To resolve this situation, we have to use type casting (Explicit Type Conversion).
Data Underflow

 Assigning a value which is less than its lower limit is called overflow.

 For example When we try to store integer value into float type variable underflow should be
happen. Because integer variable require 2 B and we have 4B float variable. So after storing
value space is remaining.

 In such situation, we waste space. No data loss should be happen.

 To resolve this situation, we have to use type conversion (Implicit Type Conversion).
Type Conversion

 Why required?: To overcome data overflow and data underflow situation.

 Definition: In C, When you convert the data type of a variable to another data type then this
technique is known as “Type Conversion”.

 There are 2 type

1. Implicit Type Conversion


2. Explicit Type Conversion
Type Conversion : Implicit

 It is also known as Automatic Type Conversion.

 It is done by automatically when we store small data type value into larger data type variable.

 ‘C’ permits to convert low range data type to high range data types.

 For example : To store integer value to float variable.


int a=10;
float b;
b=a;
Printf(“%f”,b); Output: 10.000000
Type Conversion : Explicit

 It is also known as Type Casting.

 ‘C’ permits to convert higher range data type to smaller range data types.

 In Explicit type casting, you have to force the conversion between data types.

 Syntax : (Data type name) expression

 Here data type name define data type in which we want to convert value.

 The expression can be a variable, an actual expression or a constant.


#include<stdio.h>
void main() OUTPUT:
{
float val = 56.3; Explicit Type Casting!
int a = (int)val + 50; // explicit type casting Value of val: 56.299999
printf(“Explicit Type Casting!\n"); Value of a: 106
printf("Value of val: %f\n", val);
printf("Value of a: %d\n",a);
}
Type Conversion : Explicit

 In the above example, we declared a float type variable named val.

 Then the float type variable is converted to int data type through explicit type casting.
And then it is being added.

 So, you will get an integer as output.


Advantage

 It helps you in converting one data type to another data type.

 It helps in making the program lightweight.

 With this, you can take advantage of features like type representations and hierarchies.
In-Built Type Casting Function

Function Meaning / Use

atof()  Used for converting the string data type into float data type.

atoi() Used for converting the string data type into int data type.
Compilation and Execution of C Program

 Create program.

 Save Program. [ Press “F2” or Go to File  Save ].

 Compile and Execute Program [ Ctrl + F9 ].

 To view output [ Alt + F5 ].


Debugging Program

 Debugging is used to find Logical Error.

 It is a step by step process of execution of each statement.

 To start debugging, first decide which variables value you want to see during step by step
execution of program.

 Following step should be follow

1. Click Debug  Watch  Add variable


2. Go to Source Program by clicking on it.
3. Press F7 key

You might also like