C++ PROGRAMMING EXPECTED QUESTIONS WITH
VERIFIED ANSWERS
Question 1.
C++
ANSWER
a general-purpose programming language created by Bjarne Stroustrup as an extension
of the C programming language, or "C with classes"
Question 2.
C++ language family
ANSWER
C-styled language
Question 3.
C++ paradigms
ANSWER
procedural, functional, object-oriented, generic, modular
Question 4.
C++ filename extensions
ANSWER
.cc, .cpp, .cxx, .c++, .h, .hh, .hpp, .hxx, .h++
Question 5.
C++ typing discipline
ANSWER
static, nominative, partially inferred
,Question 6.
int main()
ANSWER
a function that marks the beginning and termination of every C++ program
Question 7.
C++ primitive data types
ANSWER
int, char, bool, double, float, void, wchar_t
Question 8.
int
ANSWER
integers require 4 bytes of memory and range from -2147483648 to 2147483647
Question 9.
char
ANSWER
characters require 1 byte of memory and ranges from -128 to 127 or 0 to 255
Question 10.
bool
ANSWER
booleans can only store true or false
Question 11.
double
ANSWER
doubles require 8 bytes of memory and can store double precision floating point values
, Question 12.
float
ANSWER
floats require 4 bytes of memory and can store single precision floating point values
Question 13.
void
ANSWER
void represents a valueless entity; cannot be used for variable declaration
Question 14.
wchar_t
ANSWER
wide characters represent text in fixed-width, multi-byte encodings
Question 15.
scope resolution operator (::)
ANSWER
helps to identify and specify the context to which an identifier refers, particularly by
specifying a namespace
Question 16.
bitwise AND
ANSWER
the bitwise AND operator compares each bit of the first operand to the corresponding bit
of the second operand; if both bits are 1, the corresponding result bit is set to 1;
otherwise, the corresponding result bit is set to 0
VERIFIED ANSWERS
Question 1.
C++
ANSWER
a general-purpose programming language created by Bjarne Stroustrup as an extension
of the C programming language, or "C with classes"
Question 2.
C++ language family
ANSWER
C-styled language
Question 3.
C++ paradigms
ANSWER
procedural, functional, object-oriented, generic, modular
Question 4.
C++ filename extensions
ANSWER
.cc, .cpp, .cxx, .c++, .h, .hh, .hpp, .hxx, .h++
Question 5.
C++ typing discipline
ANSWER
static, nominative, partially inferred
,Question 6.
int main()
ANSWER
a function that marks the beginning and termination of every C++ program
Question 7.
C++ primitive data types
ANSWER
int, char, bool, double, float, void, wchar_t
Question 8.
int
ANSWER
integers require 4 bytes of memory and range from -2147483648 to 2147483647
Question 9.
char
ANSWER
characters require 1 byte of memory and ranges from -128 to 127 or 0 to 255
Question 10.
bool
ANSWER
booleans can only store true or false
Question 11.
double
ANSWER
doubles require 8 bytes of memory and can store double precision floating point values
, Question 12.
float
ANSWER
floats require 4 bytes of memory and can store single precision floating point values
Question 13.
void
ANSWER
void represents a valueless entity; cannot be used for variable declaration
Question 14.
wchar_t
ANSWER
wide characters represent text in fixed-width, multi-byte encodings
Question 15.
scope resolution operator (::)
ANSWER
helps to identify and specify the context to which an identifier refers, particularly by
specifying a namespace
Question 16.
bitwise AND
ANSWER
the bitwise AND operator compares each bit of the first operand to the corresponding bit
of the second operand; if both bits are 1, the corresponding result bit is set to 1;
otherwise, the corresponding result bit is set to 0