Programming in C++
Programming in C++
Run Program
Program Output
Source File
Object File
Program
• An ordered list of events to take place or procedures to
be followed; a schedule
• A collection of instructions that tell the computer to do
specific activity.
• A program is generally known as "software“
• Application programs
• System Software
Program
• the terms software, application, program and
instruction are synonymous in the sense that they all
tell the computer to do some specific activity.
int i;
for (i=0; i<5; i++) { ... }
• asm, auto, bool, break, case, catch, char, class, const, const_cast,
continue, default, delete, do, double, dynamic_cast, else, enum,
explicit, extern, false, float, for, friend, goto, if, inline, int, long,
mutable, namespace, new, operator, private, protected, public, register,
reinterpret_cast, return, short, signed, sizeof, static, static_cast, struct,
switch, template, this, throw, true, try, typedef, typeid, typename,
union, unsigned, using, virtual, void, volatile, wchar_t.
• and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq.
• far, huge, near (for some compiler).
Boolean
Boolean literals
There are only two valid Boolean values: true and false.
These can be expressed in C++ as values of type bool
by using the Boolean literals true and false.
Example:
bool flag1, flag2;
flag1 = false;
flag2 = true;