Principles of Programming: CP 111 Lecture No. 2
Principles of Programming: CP 111 Lecture No. 2
○ Problem analysis,
○ code test.
● Simple Input/ Output statements
● Escape codes,
● Programming Errors: syntax, runtime, and logical.
● Describing syntax and semantics
Basic Concepts:
Problem solving techniques and strategies
● A computer cannot solve a problem on its own.
● One has to provide step by step solutions of the problem to the computer.
● It is the programmer who has to write down the solution to the problem in
terms of simple operations which the computer can understand and execute.
Problem solving techniques and strategies….
● Procedures (Steps Involved in Problem Solving)
● In order to solve a problem by the computer, one has to pass though certain
stages or steps.
● We have seen that natural languages also have syntax and semantics, but
b) After encountering one true syntax error, compilers often generate many incorrect
syntax error messages; again, the compiler has been “thrown off track” by a
particular error. Why does this occur? Basically, because a compiler is a very
complex and sophisticated language-processing program, and no computer
program can analyze any language as well as a human being can at this point in
time.
Errors detected by the compiler and runtime
errors
Errors detected by the compiler and runtime
errors
What is debugging ?
Debugging:
● Is the process of identifying and removing errors from computer hardware or
software.
or
● is the process of detecting and removing of existing and potential errors
(also called as 'bugs') in a software code that can cause it to behave
unexpectedly or crash.
● To prevent incorrect operation of a software or system, debugging is used to
find and resolve bugs or defects
What is debugging ?....
● Debugger: is a computer program that assists in the detection and correction
of errors in other computer programs.