
C Coding Contest
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
D. ECE
Used 11+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
What is the correct way to declare a variable in C?
'variable x;'
'int x;'
'x = int;'
'declare x as int;'
2.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
Rank the following arithmetic operators in terms of their precedence (highest to lowest).
%, +, -, *, /
+, -, %, *, /
%, +, /, *, –
%, *, /, +, –
3.
MULTIPLE CHOICE QUESTION
20 sec • 3 pts
Among the following, which data type will throw an error during the modulus operation(%).
float
int
char
short
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the purpose of the `printf` function in C?
Reading input
Writingoutput
Performing arithmetic operations
Declaring variables
5.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
How do you comment out multiple lines in C?
'// Comment'
'/* Comment */'
'# Comment #'
'/ Comment /'
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following code?
int x = 5;
printf("%d", x++);
5
6
7
4
7.
MULTIPLE CHOICE QUESTION
20 sec • 3 pts
In C, what is the correct way to dynamically allocate memory for an integer variable?
'malloc(sizeof(int));'
'new int;'
'allocate(int);'
'memory(int);'
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
20 questions
Kiến thức về Thuật toán và Chương trình
Quiz
•
8th Grade - University
20 questions
Artificial Intelligence CT-1
Quiz
•
University
15 questions
Sains Komputer Tingkatan 5 - 1.3.3 Membina Jadual Kebenaran
Quiz
•
1st Grade - Professio...
20 questions
Micro Arch - CPUs & Fetch-Execute
Quiz
•
University
20 questions
Python Recap
Quiz
•
7th Grade - University
15 questions
Sinh hoạt lớp Tuần 7
Quiz
•
1st Grade - University
20 questions
Chapter 3: Strategic Initiatives for implementing CA
Quiz
•
University
20 questions
DWDM-2
Quiz
•
University
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
