














































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
During the course of work of the programming, we learn the core of the programming. The main points disucss in these lecture slides are:Simple Data Types, Built-In and User-Defined, Internal Representations, Floating Point Data Types, Combined Assignment Operators, Postfix Forms of Increment, Ternary Operator, Type Cast Operator, Enumeration Type
Typology: Slides
1 / 54
This page cannot be seen from the preview
Don't miss anything!















































4
Each bit can hold either a 0 or a 1. So there are just two choices for each bit, and there are 8 bits.
5
7
Type Size in Bytes Minimum Value Maximum Value
char 1 -128 127
short 2 -32,768 32,
int 2 -32,768 32,
long 4 -2,147,483,648 2,147,483,
NOTE: Values given for one machine; actual sizes are machine-dependent
1 = sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long)
1 <= sizeof (bool) <= sizeof (long)
sizeof (float) <= sizeof (double) <= sizeof (long double)
char is at least 8 bits
short is at least 16 bits
long is at least 32 bits
11
13
Header Files
climits and cfloat
14
#include
.. . cout << “Maximum long is “ << LONG_MAX << endl; cout << “Minimum long is “ << LONG_MIN << endl;
20