
Aadhya-Quiz-C-Programming
Authored by Buddie Buddie
Computers
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
a) 9 9 9 9
b) 10 10 10 10
c) 9 10 11
d) 10 11 12
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is an advantage of using switch statements over multiple if-else
statements in C?
Switch statements provide better readability
Switch statements support complex logical conditions
Switch statements offer better performance in all cases
Switch statements are more flexible in handling exceptions
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include <stdio.h>
int main()
{
int x = 5;
int y = 10;
int z = (x > y) ? (x++) : (y++);
printf("%d %d %d", x, y, z);
}
5 10 5
5 11 10
6 10 5
11 6 10
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following correctly demonstrates the usage of a
nested ternary operator?
(x > y) ? (x > z) ? x : z : (y > z) ? y : z
(x > y) ? (x > z) ? x : (y > z) ? y : z : x
(x > y) ? (x > z) ? x : (y > z) ? y : z : z
(x > y) ? (x > z) ? x : (y > z) ? z : y : x
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What value will x hold if a = 3 and b = 5?
x = (a > b) ? (a 2) : ((b > a) ? (b 2) : (a + b));
6
8
10
15
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int main()
{
int x = 1, z[2] = {10, 11};
int *p = NULL;
p = &x;
*p = 10;
p = &z[1];
*(&z[0] + 1) += 3;
printf("%d, %d, %d\n", x, z[0], z[1]);
return 0;
}
1 10 11
10 10 14
10 14 11
1 10 14
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int main() {
int a[] = {2, 4, 6, 8, 10};
int i, sum = 0, *b = a + 4;
for (i = 0; i < 5; i++)
sum = sum + (*b - i) - *(b - i);
printf("%d\n", sum);
}
8
10
11
16
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
25 questions
Stack and Queue
Quiz
•
University
28 questions
MAWD 1.01 B
Quiz
•
KG - University
30 questions
Linux Quiz (RHCSA)
Quiz
•
University
25 questions
Python Module 1
Quiz
•
University
25 questions
PYTHON CONTEST
Quiz
•
University
25 questions
SQL MIDTERM EXAM
Quiz
•
University
25 questions
Human and Computer Interaction Part 2
Quiz
•
University - Professi...
30 questions
computer essintials quize lessons 1,2,3
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University