
C Programming Quiz level 2
Quiz
•
Others
•
1st Grade
•
Hard
Kaustubh Pandey
Used 1+ times
FREE Resource
Enhance your content
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? #include int main() { int a = 5; int *p = &a; *p += *p * 2; printf("%d\n", a); return 0; }
5
10
15
20
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? #include int main() { int arr[] = {10, 20, 30, 40, 50}; int *ptr = arr + 2; printf("%d\n", *ptr); return 0; }
10
20
30
40
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? #include void update(int x) { x = x * 2; } int main() { int a = 10; update(a); printf("%d\n", a); return 0; }
10
20
0
Compilation Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? #include int main() { int x = 5; // binary: 0101 int y = 9; // binary: 1001 printf("%d\n", x ^ y); return 0; }
12
14
4
0
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? #include int main() { int arr[2][2] = {{1, 2}, {3, 4}}; printf("%d\n", *(*(arr + 1) + 1)); return 0; }
1
2
3
4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? #include int main() { char *ptr = "Hello"; ptr += 3; printf("%s\n", ptr); return 0; }
Hello
lo
llo
Syntax Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? #include int main() { int a = 1, b = 0, c = 3; if (a || ++b && c) { c += a; } printf("%d\n", c); return 0; }
3
4
5
Compilation Error
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
TEST VERBS +ing
Quiz
•
1st - 5th Grade
10 questions
cash machines
Quiz
•
1st - 5th Grade
10 questions
Quiz 47
Quiz
•
1st Grade
20 questions
C Programming Quiz
Quiz
•
1st Grade
20 questions
C Programming Basics for Kids
Quiz
•
1st Grade
10 questions
Python Basics for Grade 5
Quiz
•
1st Grade
16 questions
C Programming Challenge for Students
Quiz
•
1st Grade
20 questions
QASA/Bfs/duty roaster
Quiz
•
1st - 5th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Others
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
18 questions
D189 1st Grade OG 1c Concept 37-38
Quiz
•
1st Grade
20 questions
addition
Quiz
•
1st - 3rd Grade
20 questions
Subject and predicate in sentences
Quiz
•
1st - 3rd Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
10 questions
Exploring Force and Motion Concepts
Interactive video
•
1st - 5th Grade
10 questions
Exploring Properties of Matter
Interactive video
•
1st - 5th Grade
5 questions
Sense and Response
Quiz
•
1st Grade