
C Programming Quiz for Grade 13

Quiz
•
Computers
•
University
•
Medium
NORAZIAHTULHIDAYU BINTI KAMARUDIN NORAZIAHTULHIDAYU BINTI KAMARUDIN
Used 2+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
22 questions
c++

Quiz
•
University
25 questions
Sharda fest 2024

Quiz
•
University
15 questions
JavaScript Basics

Quiz
•
12th Grade - University
20 questions
Ôn Tập Buổi TH2 - CSLT

Quiz
•
University
16 questions
A "C" Event-the backbone of modern coding.

Quiz
•
University
16 questions
PSC ALM QUIZ

Quiz
•
University
20 questions
EST102 : PROGRAMMING IN C TEST 1

Quiz
•
University
20 questions
C-QUEST QUIZ BEE

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University