C++ examples for Data Type:Introduction
Defining the four basic data types in C and C++
int main() {//from ww w . j a v a 2 s . c om // Definition without initialization: char protein; int carbohydrates; float fiber; double fat; // Simultaneous definition & initialization: char pizza = 'A', pop = 'Z'; int dongdings = 100, twinkles = 150, heehos = 200; float chocolate = 3.14159; // Exponential notation: double fudge_ripple = 6e-4; }