
MPMNJ C Training (Control Statements Quiz)
Authored by ROCK GOWTHAM
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
What is the output of the following C code?
#include <stdio.h>
int main() {
int a = 1;
if (a==1) a=2;
if (a==2) a=3;
printf("%d", a);
return 0;
}
1
2
3
0
2.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
#include <stdio.h>
int main() {
if (0 == 0)
printf("True");
else
printf("False");
return 0;
}
True
False
None
Error
3.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
#include <stdio.h>
int main() {
if (0, 1)
printf("True");
else
printf("False");
return 0;
}
True
False
Error
None
4.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
#include <stdio.h>
int main() {
int x = 1, y = 0;
if (x && y)
printf("A");
else if (x || y)
printf("B");
else
printf("C");
return 0;
}
A
B
C
Error
5.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
#include <stdio.h>
int main() {
int x = 5;
(x > 5) ? (x = 10) : (x = 0);
printf("%d", x);
return 0;
}
0
5
10
Error
6.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
#include <stdio.h>
int main() {
int x = 5, y = 10;
printf("%d", (x > y) ? x : y);
return 0;
}
5
10
0
1
7.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
#include <stdio.h>
int main() {
int a = 5;
printf("%s", (a % 2 == 0) ? "Even" : "Odd");
return 0;
}
Even
Odd
Error
None
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
17 questions
Archivos
Quiz
•
University
10 questions
Quiz Elektronika dan PCB Design: Tantangan Cerdasmu!
Quiz
•
University
12 questions
ロジックテスト (Đề kiểm tra năng lực IT)
Quiz
•
University
17 questions
Algorytmy 8
Quiz
•
1st Grade - University
10 questions
Python with DataScience
Quiz
•
7th Grade - University
9 questions
Rounding Numbers in Python
Quiz
•
University
14 questions
Kiểm tra kiến thức tìm kiếm thông tin
Quiz
•
5th Grade - University
13 questions
minecraft : )
Quiz
•
1st Grade - Professio...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University