
C Programming
Authored by Kavinaya R
Other
University

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
45 sec • 1 pt
What does this code print?
char str[] = "World";
str[2] = 'r';
printf("%s", str);
World
Wrrld
Worrd
Worrld
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What happens here?
char str[] = "Hi";
str[2] = '!';
printf("%s", str);
Hi
Hi!
H!i
Undefined` or garbage value
Answer explanation
you're overwriting the null terminator — risky behavior!
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
`What does this function compute?
int fun(int n) {
if (n == 0) return 0;
return n + fun(n - 1);
}
Multiplication Table
Sum of n natural number
Factorial
Fibonacci
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does this function do?
void fun(int n) {
if (n == 0) return;
fun(n - 1);
printf("%d ", n);
}
Prints numbers in reverse
Prints from 1 to n
Infinite loop
Compilation error
Answer explanation
Recursion goes down to 0, then prints as it comes back
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this loop do?
for (int i = 1; i <= 3; i++) {
printf("Loop\n");
}
Prints “Loop” 1 time
Prints “Loop” 3 times
Infinite loop
Error
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will this pattern print?
for (int i = 1; i <= 3; i++) {
for (int j = 1; j <= i; j++) {
printf("*");
}
printf("\n");
}
*** **
*
*
**
***
1
2
3
***
***
***
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does this pattern print?
for (int i = 1; i <= 3; i++) {
for (int j = 1; j <= 3; j++) {
printf("%d", j);
}
printf("\n");
}
123
123
123
111
222
333
321
321
321
123
234
345
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
13 questions
rubiks cube quiz
Quiz
•
KG - Professional Dev...
10 questions
Quiz tentang Struktur Sistem File dan Operasi Dasar
Quiz
•
University
16 questions
Ley de Ohm
Quiz
•
University
15 questions
Sosialisasi Beasiswa Bank Indonesia
Quiz
•
University
15 questions
Once Upon a Time Season 1
Quiz
•
9th Grade - University
11 questions
Lab 1 - Introduction
Quiz
•
University
10 questions
Znajomość Marvel'a
Quiz
•
KG - Professional Dev...
16 questions
Fortnite
Quiz
•
KG - Professional Dev...
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
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University