
PASS 4
Quiz
•
Instructional Technology
•
University
•
Practice Problem
•
Hard
Evan Baker
FREE Resource
Enhance your content in a minute
6 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
Which of these would print these variables in one printf statement?
int var1 = 4;
float var2 = 6.5;
double var3 = 6.3;
printf("%f, %f, %lf", var1, var2, var3);
printf("%d, %f, %lf", var1, var2, var3);
printf("%d, %lf, %f", var1, var2, var3);
printf("%d, %d, %d", var1, var2, var3);
2.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Which of these is the preferred way to print these variables in one printf statement?
int var1 = 4;
float var2 = 6.5;
double var3 = 6.3;
printf("%f, %f, %lf", var1, var2, var3);
printf("%d, %f, %lf", var1, var2, var3);
printf("%d, %lf, %f", var1, var2, var3);
printf("%d, %d, %d", var1, var2, var3);
3.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
Which checks if a user input is a multiple of 3?
if(input/3)
if(!(input %3))
if((input/3)>0)
if((input % 3)==0)
4.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
Which checks if a variable named "input" is between 5 and 7 inclusive?
if ( ( (input % 5)>0) && ( (input % 7)<0) )
if ((input ==5) || (input == 6) || (input == 7))
if ((input>=5)&&(input<=7))
if (!(input<5)||(input>7))
5.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
The following code is provided:
int var = 0;
scanf("%d",&int);
Which statement only executes if the user inputs a value greater than 10
if(var>=10){
printf("output");
}
if ((var=10)){
printf("output");
}
if ((var>10));{
printf("output");
}
if(var>10){
printf("output");
}
6.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
The following is provided:
int var = 0;
scanf("%d",&var);
The program should return a different output for every input up to 2 excluding 0, and then print the same response for everything else
switch(var){
case 1:
printf("One");
break;
case 2:
printf("Two");
break;
default:
printf("Default response");
switch(var){
case 1:
printf("One");
case 2:
printf("Two");
default:
printf("Default response");
if(var<1){
printf("Default response");}
else if (var<2){
printf("One");}
else if (var<3){
printf("Two");}
else{
printf("Default response");}
if(var<1){
printf("Default response");}
if (var<2){
printf("One");}
if (var<3){
printf("Two");}
else{
printf("Default response");}
Similar Resources on Wayground
10 questions
pemro kece II
Quiz
•
University
10 questions
BPE 325 SHORT ASSESSMENT
Quiz
•
University
10 questions
Data and Process Modelling
Quiz
•
University
10 questions
Teste de Robótica
Quiz
•
6th Grade - University
10 questions
BT22103 Tutorial Class 7
Quiz
•
University
9 questions
POSTEST FORMATIF (SISTEM EFI)
Quiz
•
11th Grade - University
10 questions
MOOC
Quiz
•
University
10 questions
Sec. 8: Scripting Basics
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Instructional Technology
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
