
Aadhya-Quiz-C-Programming

Quiz
•
Computers
•
University
•
Hard
Buddie Buddie
Used 3+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
31 questions
C++ Basics

Quiz
•
University
25 questions
C Programing

Quiz
•
University
25 questions
Inter Class quizIT_23_JAN_2024

Quiz
•
University
25 questions
ppsc string questions

Quiz
•
University
26 questions
Quiz revisão linguagem C

Quiz
•
University
30 questions
Data Structures and Algorithms Quiz

Quiz
•
University
25 questions
C language

Quiz
•
University
30 questions
coding

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University