C Programing Ppt
C Programing Ppt
• C programming by e balagurusamy.
Steps in development of a program
Problem Definition:-Identity the problem, what is requirement, what
should be the output.
Testing:- Here we test the code developed in previous steps and check
whether we are getting the desired result.
Advantages of flowchart:
Flowchart is an excellent way of communicating the logic of a program.
Easy and efficient to analyze problem using flowchart.
During program development cycle, the flowchart plays the role of a blueprint,
which makes program development process easier.
After successful development of a program, it needs continuous timely
maintenance during the course of its operation. The flowchart makes program
or system maintenance easier.
It is easy to convert the flowchart into any programming language code.
Symbols used in Flowchart
Example
Exercise
Machine Language- Since computers are digital devices, they only recognize binary
data. Every program, video, image, and character of text is represented in binary. This
binary data, or machine code, is processed as input by the CPU. The resulting output is
sent to the operating system or an application, which displays the data visually. For
example, the ASCII value for the letter "A" is 01000001 in machine code, but this data is
displayed as "A" on the screen
Example: The program to add two numbers in memory and print the result look something
like the Following:
00100000000000110011100
001111000000111111000111
10011110001110110011010
Assembly Language- Assembly languages are also known as second generation
languages. These languages substitute alphabetic symbols for the binary codes of machine
language. In assembly language, symbols are used in place of absolute addresses to
represent memory locations. Mnemonics are used for operation code, i.e., single letters or
short abbreviations that help the programmers to understand what the code represents.
Example MOV AX, DX
Machine language
Machine language is the low level programming
language. Machine language can only be represented
by 0s and 1s. In earlier when we have to create a picture
or show data on the screen of the computer then it is
very difficult to draw using only binary digits(0s and
1s). For example: To write 120 in the computer system
its representation is 1111000. So it is very difficult to
learn. To overcome this problem the assembly language
is invented.
Assembly language
Assembly language is the more than low level and
less than high-level language so it is intermediary
language. Assembly languages use numbers, symbols,
and abbreviations instead of 0s and 1s.For example: For
addition, subtraction and multiplications it uses symbols
likes Add, sub and Mul, etc.
Sr.no
Machine Language Assembly Language
1
Machine language is only understand Assembly language is only understand
by the computers. by human beings not by the computers.
2
In machine language data only
In assembly language data can be
represented with the help of binary
represented with the help of mnemonics
format(0s and 1s), hexadecimal and
such as Mov, Add, Sub, End etc.
octadecimal.
3
Assembly language is easy to
Machine language is very difficult to
understand by the human being as
understand by the human beings.
compare to machine language.
4
Modifications and error fixing cannot Modifications and error fixing can be
be done in machine language. done in assembly language.
5
Machine language is very difficult to Easy to memorize the assembly
memorize so it is not possible to language because some alphabets and
learn the machine language. mnemonics are used.