QUESTION 11 The following code will evaluate as False int num1 = 10, num2 = 6, n
ID: 3555354 • Letter: Q
Question
QUESTION 11
The following code will evaluate as False
int num1 = 10, num2 = 6, num3 = 4;
if ( num2 == num1 || num3 < num1 && num1 == 10 )
True
False
2 points
QUESTION 12
The following code will evaluate as False
int num1 = 10, num2 = 6, num3 = 4;
if ( num2 == num1 || num3 < num1 && num1 == 10 )
True
False
2 points
QUESTION 13
In a switch staement the default case is required
True
False
2 points
QUESTION 14
An if statement may have an associated else
True
False
2 points
QUESTION 15
The break; statement prevents the execution from 'bleeding' into the next case inside a switch statement.
True
False
2 points
QUESTION 16
long int ivar1, ivar2 = 20, ivar3 = 6;
double dvar1, dvar2 = 1.2, dvar3 = 4.5;
ivar1 = dvar2;
printf("ivar1= %i ", ivar1);
This program will display (content of ivar1):
1.2
1.0
1
none of the above
4 points
QUESTION 17
What will be the output with the following code:
long int ivar1, ivar2 = 20, ivar3 = 6;
double dvar1, dvar2 = 1.2, dvar3 = 4.5;
ivar1 = dvar2;
printf("ivar1= %i ", ivar1);
1.2
1.0
1
none of the above
4 points
QUESTION 18
Given:
int a= 36, b= 6, result;
result = a % b ;
The value of result will be:
0
6
none of the above
4 points
QUESTION 19
How will the loop below display:
int count = 1;
while (count < 10){
printf(" %i", count);
count = count + 1;
}
numbers from 1 to 10
numbers from 1 to 9
numbers from 0 to 9
numbers from 0 to 10
4 points
QUESTION 20
What will be the ouput with the following code:
long int ivar1, ivar2 = 20, ivar3 = 6;
double dvar1, dvar2 = 1.2, dvar3 = 4.5;
dvar1 = (double) ivar2 / ivar3;
printf("dvar1= %lf ", dvar1);
3
3.333333
3.000000
none of the above
1.2
1.0
1
none of the above
Explanation / Answer
Hi,
Please find the answers to your questions:
Answer 11 : true
Answer 12 : true
Answer 13 : false(it is optional)
Answer 14 : true
Answer 15 : true
Answer 16 : option c(1)
Answer 17 : option c(1)
Answer 18 : option a(0)
Answer 19 : option b(numbers from 1 to 9)
Answer 20: option b(3.333333)
Do rate:)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.