click below
click below
Normal Size Small Size show me how
Basic Elements C++
Basic Elements of C++
Question | Answer |
---|---|
A C++ program is a collection of ___ | functions |
Every C++ program has a function called ___ | main |
A ___ comment starts with the pair of symbols // anywhere in the line | single-line |
___ comments are enclosed between /* and */ | multiline |
The compiler skips ___ | comments |
___ cannot be used as identifiers in a program | reserved words |
All reserved words in C++ consist of ___ letters | lowercase |
In C ++, ___ are names used to identify variables | identifiers |
A C++ identifier consists of ___, ___ and ___ and must begin with a letter or underscore | letters, digits, underscore |
___ includes blank, tabs, and newline characters | whitespace |
___ data types are classified into nine categories: char, short, int, long, bool, unsigned char, unsigned short, unsigned int, and unsigned long. | integral |
The values belonging to ___ data types are -2147483648 (=2^31) to 2147483647 (=2^31-1) | int |
The data type ___ had only two values: true and false | bool |
C++ provides three data types to manipulate decimal numbers: ___, ___, and ___ | float, double, long double |
The data type ___ is used in C++ to represent any real number between -3.4*10^38 and 3.4-10^38. The memory allocated for a value of the float data type is four bytes. | float |
The data type ___ is used in C++ to represent any real number between -1.7*10^308 and 1.7*10^308. The memory allocated for a value of the double value is eight bytes. | double |
The arithmetic operators in C++ are ___ (+), ___ (-), ___ (*), ___ (/) and ___ (%) | addition, subtraction, multiplication, division, and modulus. |