Q: Which of the following is not one of the sizes of the floating point types?
Solution: Floating point types occur in only three sizes-float, long double and double.
Q: Which of the following is a valid floating-point literal?
Solution: To make a floating point literal, we should attach a suffix of âfâ or âFâ and there should not be any blank space.
Q: What is the range of the floating point numbers?
Solution: This is the defined range of floating type number sin C++. Also range for +ve and -ve side should be same so the answer is -3.4E+38 to +3.4E+38.
Q: Which of three sizes of floating point types should be used when extended precision is required?
Solution: Float for single precision, double for double precision and long double for extended precision.
Q: Which is used to indicate single precision value?
Solution: Either F or f can be used to indicate single precision values.
Q: Which is correct with respect to the size of the data types?
Solution: The char has less bytes than int and int has less bytes than double whereas int and float can potentially have same sizes.
Q: The size of an object or a type can be determined using which operator?
Solution: The sizeof operator gives the size of the object or type.
Q: It is guaranteed that a ____ has at least 8 bits and a ____ has at least 16 bits.
Solution: char types in C++ require atleast 8 bits and short requires atleast 16 bits, whereas for bool only 1 bit suffices and both int and float requires atleast 32 bits.
Q: Implementation dependent aspects about an implementation can be found in ____
Solution: The limit header holds the details of the machine dependent details.
Q: Size of C++ objects are expressed in terms of multiples of the size of a ____ and the size of a char is _______
Solution: Each object in C++ is expressed in terms of char type and size of char type is one byte.
You Have Score    | /10 |