
C Programming Quiz for Grade 13
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
NORAZIAHTULHIDAYU BINTI KAMARUDIN NORAZIAHTULHIDAYU BINTI KAMARUDIN
Used 2+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax to declare a function in C that takes two integers as parameters and returns an integer?
int function(int a, int b);
int function(a, b);
function(int a, int b);
int function(int, int) = 0;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default return type of a function in C if not specified?
void
int
float
char
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to return a value from a function in C?
break
continue
return
exit
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```c int add(int a, int b) { return a + b; } int main() { printf("%d", add(2, 3)); return 0; } ```
23
5
2
3
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to declare a function that does not return any value?
void function();
int function();
function void();
function();
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? ```c void printHello() { printf("Hello"); } int main() { printHello(); return 0; } ```
Hello
printHello
0
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about function prototypes in C is true?
Function prototypes are optional in C.
Function prototypes must be declared before their first use.
Function prototypes are only required for recursive functions.
Function prototypes are not allowed in C.
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
17 questions
Lección1 - JavaScript
Quiz
•
1st Grade - Professio...
18 questions
Model Tuning Quiz
Quiz
•
University
20 questions
SPCC ISE 2 Quiz TE B
Quiz
•
University
15 questions
Introduction to Django Framework Quiz
Quiz
•
University
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
20 questions
WML & WAP
Quiz
•
University
15 questions
SENATIC Parcial Guía 3_PseInt
Quiz
•
10th Grade - University
15 questions
ENGINEERING DATA ANALYSIS PRELIM
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
