Question 12 (1 point) radius is a C++ keyword. Question 12 options: True False S
ID: 3912701 • Letter: Q
Question
Question 12 (1 point)
radius is a C++ keyword.
Question 12 options:
True
False
Save
Question 13 (1 point)
Declare an int called s with an initial value of 20. Don't put in any unnecessary spaces.
Question 13 options:
Save
Question 14 (1 point)
What is the value of 11/2
Question 14 options:
Save
Question 15 (1 point)
What is the value of 2 / 5 * 3
Question 15 options:
Save
Question 16 (1 point)
What is the final value of d after the following code segment is executed?
double d=1.0;
int a=1;
d = a++;
Question 16 options:
0.0
1.0
2.0
undefined
Save
Question 17 (1 point)
What is the final value of d after the following code segment is executed?
double d=1.0;
int a=1;
d = ++a;
Question 17 options:
0.0
1.0
2.0
undefined
Save
Question 18 (1 point)
What is the final value of d after the following code segment is executed?
double d=1.0;
int a=1;
d = a/2;
Question 18 options:
0.0
0.5
1.0
undefined
Save
Question 19 (1 point)
The default case is required with the break statement.
Question 19 options:
True
False
Save
Question 20 (1 point)
The expression (x > y && a < b) is true if either x > y or a < b .
Question 20 options:
True
False
Save
Question 21 (1 point)
What is the result of the following expression:
floor(123.4567 * 100 + .5) / 100
Question 21 options:
Save
True
False
Explanation / Answer
Answer 12
*********
false, radius could be variable name e.g int radius
Answer 13
*********
int s=20
Answer 14
*********
11/2 = 5.5 if variable is declare as float else if int declared then value will be 5
Answer 15
*********
(2/5)*3 = (0.4)*3 = 1.2
Answer 16
**********
1.0
#include <stdio.h>
#include <conio.h>
int main()
{
double d=1.0;
int a=1;
d = a++;
printf("%lf",d);
return 0;
}
Answer 17
*********
2.0
#include <stdio.h>
#include <conio.h>
int main()
{
double d=1.0;
int a=1;
d = ++a;
printf("%lf",d);
return 0;
}
Answer 18
*********
0.0
#include <stdio.h>
#include <conio.h>
int main()
{
double d=1.0;
int a=1;
d = a/2;
printf("%lf",d);
return 0;
}
Answer 19
*********
False
case constant2:
// code to be executed if n is equal to constant2;
break;
.
.
.
default:
// code to be executed if n doesn't match any constant
in cases we need to break but in default it will not need to break , if you want to
terminate program then break in the default will need
Answer 20
*********
False
both condition should be satisfied as && sign is there not || or sign
Answer 21
*********
123.4617
but using floor it will be 123.00
Thanks
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.