QUESTION 21 How many times the loop below will run: int count = 0; while (count
ID: 3555355 • Letter: Q
Question
QUESTION 21
How many times the loop below will run:
int count = 0;
while (count < 11 ){
printf(" %i", count);
count = count + 1;
}
9
10
11
none of the above
4 points
QUESTION 22
What will be the output (content of ivar1) 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 23
What will be printed out when the following code executes?
int num = 90;
switch (num) {
case 90: printf("90 ");
case 91: printf("91 ");
break;
case 92: printf("92 ");
break;
default: printf("default ");
}
90 91
90
91
90 91 92
4 points
QUESTION 24
How many times the loop below will run:
int count = 0;
while (count < 10){
printf(" %i", count);
count = count + 1;
}
9
10
11
none of the above
4 points
QUESTION 25
What will be printed out when the following code executes?
int num = 91;
switch (num) {
case 90: printf("90 ");
case 91: printf("91 ");
break;
case 92: printf("92 ");
break;
default: printf("default ");
}
90 91
91
91 default
91 92
4 points
QUESTION 26
printf("Enter an integer ");
is an escape sequence character that moves the cursor to the next tab position
True
False
2 points
QUESTION 27
C will consider the variables number and NUmber identical.
True
False
2 points
QUESTION 28
#define TRUE 1
#define FALSE 0
These pre-procesoor directives will define the words TRUE and FALSE to be used as boolean variables
True
False
2 points
QUESTION 29
int m, n, x, y ;
m= 10;
n = 20;
x = 15;
y = m + n / x;
After the last stattement is executed the value of y will be 11
True
False
2 points
QUESTION 30
The opertors *, /, %, + and - all have the same level of precedence.
True
False
2 points
QUESTION 31
Write a for loop that runs 5 times and accepts the input of an integer number every time. Those numbers will be accumulated by a variable called total.
Path: p
Words:0
10 points
QUESTION 32
Write a do-while loop that will prompt and accept a positive number If the number is not positive then it will be repeated and request a positive number again.
Path: p
Words:0
10 points
Click Save and Submit to save and submit. Click Save All Answers to save all answers.
9
10
11
none of the above
Explanation / Answer
21) 1) 11
22) 1) 1
23) 1) 90 and 91
24)1) 10
25) 1) 91
26) false
27) false
28) false
29) true
30) false
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.