Programming Fundamentals 01
Programming Fundamentals 01
IN C++
LECTURE 01
CS- 123
Reference Book
• Object Oriented Programming in C++ by Robert Lafore
Programming languages
• A program is a set of instructions that help computer to perform tasks. This
set of instructions is also called as scripts. Programs are executed by
processor whereas scripts are interpreted. The languages that are used to
write a program or set of instructions are called "Programming languages".
Types of Programming Language
•.
Machine Level Language
• When developing programs there are three types of error that can occur:
• syntax errors
• logic errors
• runtime errors
Syntax errors
• A syntax error occurs when the code given does not follow the syntax rules of
the programming language. Examples include:
• misspelling a statement, eg writing pint instead of print
• using a variable before it has been declared
• missing brackets, eg opening a bracket, but not closing it
• A program cannot run if it has syntax errors. Any such errors must be fixed
first. A good integrated development environment (IDE) usually points out any
syntax errors to the programmer.
Logic errors
• A logic error is an error in the way a program works. The program can run but
does not do what it is expected to do.