Variables, Keywords, Expressions,
Statements
, Program
•Sequence of instructions that specify how to perform a computation.
•Basic instructions in almost every program:
–Input: Get data from keyboard, or file or some other device.
–Output: Display data on the screen or send data to a file or other device.
–Math: Perform basic mathematical operations like addition and multiplication
–Conditional Execution: Check for certain conditions and execute the appropria
quence of statements.
–Repetition: Perform some action repeatedly , usually with some variation
, Debugging
• Programming errors are called bugs.
• Process of tracking bugs and correct them is called debugging.
Types of Errors
• Syntax Errors : invalid code the compiler doesn't understand
printf(%d,s)
• Run Time Errors (Exceptions)
a= 10/0;
• Semantic Errors : valid code the compiler understands
Dangling Else
Statements
, Program
•Sequence of instructions that specify how to perform a computation.
•Basic instructions in almost every program:
–Input: Get data from keyboard, or file or some other device.
–Output: Display data on the screen or send data to a file or other device.
–Math: Perform basic mathematical operations like addition and multiplication
–Conditional Execution: Check for certain conditions and execute the appropria
quence of statements.
–Repetition: Perform some action repeatedly , usually with some variation
, Debugging
• Programming errors are called bugs.
• Process of tracking bugs and correct them is called debugging.
Types of Errors
• Syntax Errors : invalid code the compiler doesn't understand
printf(%d,s)
• Run Time Errors (Exceptions)
a= 10/0;
• Semantic Errors : valid code the compiler understands
Dangling Else