
Basic C Programming - Function parameter

Quiz
•
Education
•
12th Grade
•
Hard
Hafizul Hasmie
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for declaring a function in C?
parameters function_name(return_type)
return_type function_name(parameters)
return_type function_name(parameters);
function_name(parameters) return_type
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a function in C?
function_name(Parameters) { // Function body }
Return_Type Parameters function_name { // Function body }
function_name(Parameters) { // Function body } Return_Type
Return_Type function_name(Parameters) { // Function body }
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a function prototype in C?
A function prototype in C is a declaration of a function that specifies only the function's name.
A function prototype in C is a definition of a function that includes the function body.
A function prototype in C is a declaration of a function that specifies the function's name and return type but not the parameters.
A function prototype in C is a declaration of a function that specifies the function's name, return type, and parameters without providing the function body.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain pass by value in C with an example.
In C, pass by value is demonstrated by passing variables to a function and modifying them inside the function. The original variables remain unchanged after the function call.
Pass by value in C involves passing pointers to variables
Pass by value in C allows direct modification of original variables inside a function
Pass by value in C means passing variables to a function without modifying them
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the return statement in a function in C?
To print a message on the console
To terminate the function and return a value
To skip the function and move to the next one
To pause the execution of the program
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a function that takes two integer parameters in C?
void functionName(int param1, int param2)
int functionName(int param1, int param2)
void functionName(int param1; int param2)
void functionName(param1, param2)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between function declaration and function definition in C?
Function declaration specifies the function signature, while function definition includes the implementation.
Function declaration includes the implementation, while function definition specifies the signature.
Function declaration and function definition are interchangeable terms in C.
Function declaration defines the function signature, while function definition specifies the implementation.
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
RBT Tingkatan 3- Bab 2: Pembangunan Produk

Quiz
•
7th Grade - University
10 questions
Unreal Engine Basics

Quiz
•
12th Grade
15 questions
Email Etiquette Review

Quiz
•
6th - 12th Grade
14 questions
Basisbeginselen van de farmacologie

Quiz
•
12th Grade
10 questions
Java Strings

Quiz
•
1st Grade - Professio...
10 questions
JavaScript

Quiz
•
1st - 12th Grade
10 questions
Python Functions Quiz

Quiz
•
12th Grade
10 questions
Python quiz

Quiz
•
KG - Professional Dev...
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade