32. In memory, C++ automatically places afa) a. semicolon, indicates the end of
ID: 3907227 • Letter: 3
Question
32. In memory, C++ automatically places afa) a. semicolon, indicates the end of the statement b. In, indicates an escape sequence c. null terminator, marks the end of the string d. bracket, marks t c. None of these at the end of string literals which string of the following defines a double-precision flosting-point variable named a. float payCheck b. double payCheck c. payCheck double: d. Double payCheck; payCheck? 34. The data type of a variable whose value can be either true or false is a. int b. binary c. bool d. Boolean e. T/F 35. What will be the output after the following lines of code execute? bool choice; choice true; coutExplanation / Answer
32)Option C
acts as a string terminator in C. It is known as the null character, or NUL. It signals code that processes strings - standard libraries but also your own code - where the end of a string is. In C, this null character has to be added manually to identify strings. Whereas in C++ it is added automatically by the compiler.
33)option b
float is a 32 bit IEEE 754 single precision Floating Point Number1 bit for the sign, (8 bits for the exponent, and 23* for the value), i.e. float has 7 decimal digits of precision.
double is a 64 bit IEEE 754 double precision Floating Point Number (1 bit for the sign, 11 bits for the exponent, and 52* bits for the value), i.e. double has 15 decimal digits of precision.
So double has 2x more precision than float.
34)option c
Bool is a fundamental type in C and C++ languages. Variables of this type can only take two values- 1 and 0. In C++ these correspond to true and false and can be used interchangeably.
35)Option c
Because bool data types stores the true value as 1 and false value as 0 in its variables.
36)Option b
Because auto for variables, specifies that the type of the variable that is being declared will be automatically deduced from its initialize.So in the above initialization the value 14.95 is stored in a double.
37)Option c
Because Scope defines the region of a program or a function where there is access to the variable.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.