
C Programming Quiz level 2
Quiz
•
Others
•
1st Grade
•
Practice Problem
•
Hard
Kaustubh Pandey
Used 1+ times
FREE Resource
Enhance your content in a minute
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
Already have an account?
Similar Resources on Wayground
19 questions
RIAPPROPRIARSI DEGLI SPAZI URBANI: INTERVENTI DI URBANISTICA TATTICA PER UNA CITTÀ SOSTENIBILE E INCLUSIVA
Quiz
•
1st Grade
15 questions
Famous Places in Bangladesh Quiz
Quiz
•
1st Grade
15 questions
Materi Informatika Kelas 7 Semester 1
Quiz
•
1st Grade
15 questions
Macronutrients
Quiz
•
1st Grade
15 questions
Nursing Theory and Practice Quiz
Quiz
•
1st - 5th Grade
15 questions
chap 1
Quiz
•
1st Grade
20 questions
องค์ประกอบของระบบคอมพิวเตอร์
Quiz
•
1st Grade
10 questions
ELA VOCAB
Quiz
•
1st - 5th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Others
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
14 questions
States of Matter
Lesson
•
KG - 3rd Grade
13 questions
Veterans' Day
Quiz
•
1st - 3rd Grade
20 questions
Multiplication Mastery Checkpoint
Quiz
•
1st - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
16 questions
natural resources
Quiz
•
1st Grade
20 questions
Identify Coins and Coin Value
Quiz
•
1st Grade
24 questions
Addition
Quiz
•
1st Grade
