Lecture #5
Lecture #5
PROBLEM SOLVING
(FALL 2022-23)
Lecture 5
REVISION
2
ASCI/ANSII CODE TABLE
u American Standard Code for Information Exchange (ASCI): 0-127
u American National Standards Institute (ANSI): 0-255
Thanks to:https://simple.wikipedia.org/wiki/ASCII
Thanks to:https://simple.wikipedia.org/wiki/ASCII
Number System
u Revise
Binary, Decimal and Hexadecimal
System
§ Details will be covered in a tutorial
ASCI USAGE EXAMPLE IN C++
u Cay Horstmann:
§ Chapter 2: 2.1,2.3 (partial)
CHAPTER 2: FUNDAMENTAL
DATA TYPES
COMMENTS IN PROGRAM
u Do use comments in your programs; Programs
with comments may earn you more marks!
Examples:
§ cout << ”\x41”; // A will be printed
§ cout << ”Hello\x9\x9World”; // Prints Hello World
USING VARIABLES IN A PROGRAM